mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
更新资源map;本地存在资源时不再获取节点加快响应;fix#91
This commit is contained in:
parent
2e8aea4542
commit
a62109a6c0
11 changed files with 21 additions and 17 deletions
|
|
@ -37,6 +37,9 @@ export const downloadResourceImage = async (
|
|||
) => {
|
||||
localBase = LocalURI[localBase];
|
||||
const finalPath = path.join(localBase, filename);
|
||||
if (fs.existsSync(finalPath) && fs.statSync(finalPath).size > 0) {
|
||||
return finalPath;
|
||||
}
|
||||
const url = await getResourceRemotePath(remoteLabel, filename);
|
||||
let result = await checkFile(url, finalPath);
|
||||
if (!result && !!replaceFilename) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue