We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58f31ed commit d47010aCopy full SHA for d47010a
src/utils/str.ts
@@ -26,6 +26,12 @@ export function formatPath(path: string, suffix: string = "") {
26
path = Zotero.File.normalizeToUnix(path);
27
if (Zotero.isWin) {
28
path = path.replace(/\//g, "\\");
29
+
30
+ if (path[0] === "\\" && path[1] !== "\\") {
31
+ // Assume it's an UNC path wrongly formatted, e.g. `\wsl.localhost\...` from pathHelper
32
+ path = `\\${path}`;
33
+ }
34
+ return path;
35
}
36
if (suffix && !path.endsWith(suffix)) {
37
path += suffix;
0 commit comments