mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 05:00:22 +08:00
fix(extract-asar): hostFs.promises 补上 rename
atomicWriteFile/atomicCopyFile 需要 fsp.rename,hostFs.promises 原先漏了。 启动种子调 atomicWriteFile 第二步 rename 直接抛 TypeError: fsp.rename is not a function,导致 /dsh-purge/apply 整条链路倒下。 跟 copyFile 一样走 fsForPair 路由,保证 src/dest 跨 asar/disk 边界时 用的是同一侧 fs。
This commit is contained in:
1 parent
11d3c0748d
commit
324b899dae
1 file changed
+1
@@ -83,6 +83,7 @@ export const hostFs = {
|
||||
unlink: (p, ...args) => fsFor(p).promises.unlink(p, ...args),
|
||||
rm: (p, ...args) => fsFor(p).promises.rm(p, ...args),
|
||||
copyFile: (src, dest, ...args) => fsForPair(src, dest).promises.copyFile(src, dest, ...args),
|
||||
rename: (src, dest, ...args) => fsForPair(src, dest).promises.rename(src, dest, ...args),
|
||||
},
|
||||
};
|
||||
for (const method of HOST_SYNC) hostFs[method] = route(method, false);
|
||||
|
||||
Reference in new issue
Block a user