fix: EEXISTS error on linux if plugin/theme overrides core js file

isekai-main
Barış Soner Uşaklı 2 years ago
parent fe0020fb31
commit ebd5dcc6d6

@ -27,14 +27,6 @@ JS.scripts = {
modules: { }, modules: { },
}; };
async function linkIfLinux(srcPath, destPath) {
if (process.platform === 'win32') {
await fs.promises.copyFile(srcPath, destPath);
} else {
await file.link(srcPath, destPath, true);
}
}
const basePath = path.resolve(__dirname, '../..'); const basePath = path.resolve(__dirname, '../..');
async function linkModules() { async function linkModules() {
@ -55,7 +47,7 @@ async function linkModules() {
if (stats.isDirectory()) { if (stats.isDirectory()) {
await file.linkDirs(srcPath, destPath, true); await file.linkDirs(srcPath, destPath, true);
} else { } else {
await linkIfLinux(srcPath, destPath); await fs.promises.copyFile(srcPath, destPath);
} }
})); }));
} }

Loading…
Cancel
Save