fix & logs for writeFile error

Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
This commit is contained in:
FTCHD
2025-09-11 14:48:36 +02:00
parent 4aa3aded41
commit 88c9d2d2ae
2 changed files with 11 additions and 2 deletions
+4 -1
View File
@@ -39,10 +39,13 @@ export async function initRclone(args: string[]) {
let activeConfigFile = state.activeConfigFile
const defaultPath = await getDefaultPath(system ? 'system' : 'internal')
console.log('[initRclone] defaultPath', defaultPath)
if (system) {
const hasConfig = await exists(defaultPath).catch(() => false)
if (!hasConfig) {
await writeFile(defaultPath, new Uint8Array())
// const data = new Uint8Array([32]) // ASCII code for space character
await writeFile(defaultPath, new Uint8Array([]))
}
}