chore: removed unused arg
mellbacon committed
Jun 27, 2023 at 13:12 UTC
17505104ae191483163d2a03a42e2884b15c4fe7
1 file changed
+1
-12
src/lib/File.ts
+1
-12
@@ -89,17 +89,6 @@ export async function moveFile(source: string, dest: string, file: string, type:
89
} catch (error) {
90
console.error(error);
91
}
92
-
93
- /*
94
- // Should use this as fallback
95
- fs.copyFile(source, dest);
96
- if (type === "directory") {
97
- fs.removeDir(source);
98
- }
99
- else {
100
- fs.removeFile(source);
101
- }
102
- */
92
}
93
94
export async function saveFile(saveAs = false) {
@@ -144,7 +133,7 @@ export async function openInExplorer(path: string) {
133
export async function moveToTrash(p: string) {
134
// open dialog to choose between recycling bin and perm delete
135
if (!await dialog.ask(`Are you sure you want to delete ${p.split(path.sep).pop()}?`)) return;
147
- await invoke("delete_file", {path: p, perm: false, isFile: p.includes(path.sep)})
136
+ await invoke("delete_file", {path: p, perm: false})
137
}
138
139
export async function createFolder(p) {