mirror of https://github.com/gorhill/uBlock.git
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 ( match === null ) { break; }
|
||||||
if ( toParsedURL(match[1]) !== undefined ) { continue; }
|
if ( toParsedURL(match[1]) !== undefined ) { continue; }
|
||||||
if ( match[1].indexOf('..') !== -1 ) { 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; }
|
if ( sublistURLs.has(subURL) ) { continue; }
|
||||||
sublistURLs.add(subURL);
|
sublistURLs.add(subURL);
|
||||||
out.push(
|
out.push(
|
||||||
|
|
Loading…
Reference in New Issue