remove query string from task name

This commit is contained in:
MaysWind 2019-10-08 21:55:22 +08:00
parent a3f06ba346
commit fc2d9678ee

View file

@ -20,7 +20,14 @@
return path; return path;
} }
return path.substring(index + 1); var fileNameAndQueryString = path.substring(index + 1);
var queryStringStartPos = fileNameAndQueryString.indexOf('?');
if (queryStringStartPos <= 0) {
return fileNameAndQueryString;
}
return fileNameAndQueryString.substring(0, queryStringStartPos);
}; };
var calculateDownloadRemainTime = function (remainBytes, downloadSpeed) { var calculateDownloadRemainTime = function (remainBytes, downloadSpeed) {