对于目录结尾有斜杠"/"或没有的进行统一以便去重。

This commit is contained in:
fengqi 2022-01-10 17:24:17 +08:00
parent 0bfd3b395b
commit 9160a27279
2 changed files with 6 additions and 0 deletions

View File

@ -79,6 +79,9 @@
{
$.merge(downloadDirs,system.dictionary.folders.split("\n"));
}
downloadDirs = downloadDirs.map(item => {
return item[item.length - 1] == '/' ? item.slice(0, -1) : item;
});
downloadDirs = uniq(downloadDirs);
if (system.config.hideSubfolders == false && system.currentListDir != null && system.currentListDir != "") {

View File

@ -68,6 +68,9 @@
{
$.merge(downloadDirs,system.dictionary.folders.split("\n"));
}
downloadDirs = downloadDirs.map(item => {
return item[item.length - 1] == '/' ? item.slice(0, -1) : item;
});
downloadDirs = uniq(downloadDirs);
if (system.config.hideSubfolders == false && system.currentListDir != null && system.currentListDir != "") {