« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/upd8.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 6a0ff088..91cc66df 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -2052,7 +2052,13 @@ function writeSymlinks() {
                 throw error;
             }
         }
-        await symlink(path.resolve(directory), file);
+        try {
+            await symlink(path.resolve(directory), file);
+        } catch (error) {
+            if (error.code === 'EPERM') {
+                await symlink(path.resolve(directory), file, 'junction');
+            }
+        }
     }
 }