consolidate mount/unmount

This commit is contained in:
FTCHD
2025-02-02 11:33:41 +02:00
parent 474fd13062
commit 2ee05c4fe2
4 changed files with 111 additions and 27 deletions
+2 -2
View File
@@ -74,7 +74,7 @@ export async function dialogGetMountPlugin() {
}
}
export async function unmountRemote(mountPoint: string, force = false) {
export async function unmount(mountPoint: string, force = false) {
const command = Command.create('umount', [force ? '-f' : '', mountPoint])
const output = await command.execute()
@@ -91,7 +91,7 @@ export async function unmountRemote(mountPoint: string, force = false) {
cancelLabel: 'Cancel',
})
if (answer) {
return await unmountRemote(mountPoint, true)
return await unmount(mountPoint, true)
}
throw new Error(output.stderr)
}