« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/upd8.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/upd8.js')
-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');
+            }
+        }
     }
 }