Merge pull request #585 from fengqi/master

对于下载目录结尾有斜杠"/"或没有的进行统一以便去重。
This commit is contained in:
Alex Wang 2022-02-23 14:57:02 -08:00 committed by GitHub
commit 0bbe64d286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 != "") {