can’t innovate my ass 

Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
This commit is contained in:
FTCHD
2025-12-07 18:42:44 +01:00
committed by GitHub
parent 4254efe732
commit 7a62659323
243 changed files with 20668 additions and 11553 deletions
-34
View File
@@ -4,7 +4,6 @@ import { exists, writeFile } from '@tauri-apps/plugin-fs'
import { fetch } from '@tauri-apps/plugin-http'
import { revealItemInDir } from '@tauri-apps/plugin-opener'
import { platform } from '@tauri-apps/plugin-os'
import { Command } from '@tauri-apps/plugin-shell'
export async function needsMountPlugin() {
console.log('[needsMountPlugin]')
@@ -74,36 +73,3 @@ export async function dialogGetMountPlugin() {
}
}
}
export async function unmount(mountPoint: string, force = false) {
console.log('[unmount]', mountPoint, force)
const command = Command.create('umount', [force ? '-f' : '', mountPoint])
const output = await command.execute()
if (output.code !== 0) {
if (output.stderr.toLowerCase().includes('busy')) {
const answer = await ask('This resource is busy, do you wish to force unmount?', {
title: 'Could not unmount',
kind: 'warning',
okLabel: 'Force Unmount',
cancelLabel: 'Cancel',
})
if (answer) {
return await unmount(mountPoint, true)
}
throw new Error(output.stderr)
}
if (output.stderr.toLowerCase().includes('not currently mounted')) {
console.error('[unmount] not currently mounted')
return
}
console.error('[unmount] failed to unmount', output.stderr)
throw new Error(output.stderr)
}
return
}