Skip to content

Node.js based forum software built for the modern web

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

Barış Soner Uşaklıebd5dcc6d628
diff --git a/src/meta/js.js b/src/meta/js.js
index 69ab76f369..454b682cc3 100644
--- a/src/meta/js.js
+++ b/src/meta/js.js
@@ -27,14 +27,6 @@ JS.scripts = {
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, '../..');
async function linkModules() {
@@ -55,7 +47,7 @@ async function linkModules() {
if (stats.isDirectory()) {
await file.linkDirs(srcPath, destPath, true);
} else {
- await linkIfLinux(srcPath, destPath);
+ await fs.promises.copyFile(srcPath, destPath);
}
}));
}