diff --git a/package/scripts/install-npm.js b/package/scripts/install-npm.js index 92d77b2bf7..b0845f3616 100644 --- a/package/scripts/install-npm.js +++ b/package/scripts/install-npm.js @@ -8,11 +8,9 @@ const createSymlink = (p) => { const srcDir = path.resolve(`./cpp/${p}`); const dstDir = path.resolve(`./android/cpp/${p}`); - if (fs.existsSync(dstDir)) { - fs.unlinkSync(dstDir); + if (!fs.existsSync(dstDir)) { + fs.symlinkSync(srcDir, dstDir, "dir"); } - - fs.symlinkSync(srcDir, dstDir, "dir"); }; // Copy common cpp files from the package root to the android folder