fix downloads page

This commit is contained in:
josc146 2023-05-29 23:27:44 +08:00
parent 8838b60e97
commit d4ce828e99

View File

@ -169,10 +169,12 @@ export function isSystemLightMode() {
export function downloadProgramFiles() {
manifest.programFiles.forEach(({ url, path }) => {
if (path)
ReadFileInfo(path).then(info => {
if (info.size == 0 && url)
AddToDownloadList(path, url.replace('@master', '@v' + manifest.version));
}).catch(() => {
if (url)
AddToDownloadList(path, url.replace('@master', '@v' + manifest.version));
});
});
@ -180,7 +182,7 @@ export function downloadProgramFiles() {
export function forceDownloadProgramFiles() {
manifest.programFiles.forEach(({ url, path }) => {
if (url)
if (path && url)
AddToDownloadList(path, url.replace('@master', '@v' + manifest.version));
});
}