using sep instead of manually defining it
mellobacon committed
Aug 25, 2022 at 13:37 UTC
2d1a1c98b72956b65a0187d103d2dd71e79ca187
1 file changed
+2
-2
src/components/Modal/RenameModel.svelte
+2
-2
@@ -84,11 +84,11 @@
84
return;
85
}
86
let oldpath = path;
87
- let newpath = path.split("\\");
87
+ let newpath = path.split(sep);
88
newpath.pop();
89
90
newpath.push(`${filenameinput}`);
91
- path = newpath.join("\\");
91
+ path = newpath.join(sep);
92
93
await fs.renameFile(oldpath, path);
94
await updateTree();