mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-03 09:39:38 +02:00
Fix computing the path of nested lists
Regression from: - https://github.com/uBlockOrigin/uBlock-issues/issues/1034 Nested lists must have their path computed from their parent list path, not from the path of the root list.
This commit is contained in:
parent
229bc8c0bf
commit
a5a447186b
@ -261,7 +261,10 @@ api.fetchFilterList = async function(mainlistURL) {
|
||||
if ( match === null ) { break; }
|
||||
if ( toParsedURL(match[1]) !== undefined ) { continue; }
|
||||
if ( match[1].indexOf('..') !== -1 ) { continue; }
|
||||
const subURL = rootDirectoryURL.href + match[1];
|
||||
// Compute nested list path relative to parent list path
|
||||
const pos = result.url.lastIndexOf('/');
|
||||
if ( pos === -1 ) { continue; }
|
||||
const subURL = result.url.slice(0, pos + 1) + match[1];
|
||||
if ( sublistURLs.has(subURL) ) { continue; }
|
||||
sublistURLs.add(subURL);
|
||||
out.push(
|
||||
|
Loading…
Reference in New Issue
Block a user