From e3e88e2d70356651b43cc7a1357dcf514a61f123 Mon Sep 17 00:00:00 2001 From: FTCHD <144691102+FTCHD@users.noreply.github.com> Date: Sun, 31 Aug 2025 01:48:11 +0200 Subject: [PATCH] missing system config handling Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com> --- lib/rclone/init.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/rclone/init.ts b/lib/rclone/init.ts index 6d2ae6a..80fce00 100644 --- a/lib/rclone/init.ts +++ b/lib/rclone/init.ts @@ -39,6 +39,13 @@ export async function initRclone(args: string[]) { let activeConfigFile = state.activeConfigFile const defaultPath = await getDefaultPath(system ? 'system' : 'internal') + if (system) { + const hasConfig = await exists(defaultPath).catch(() => false) + if (!hasConfig) { + await writeFile(defaultPath, new Uint8Array()) + } + } + if (configFiles.length === 0) { if (system) { let isEncrypted = false @@ -195,7 +202,7 @@ export async function provisionRclone() { const downloadedFile = await fetch(downloadUrl).then((res) => res.arrayBuffer()) console.log('[provisionRclone] downloadedFile') - let tempDirExists + let tempDirExists = false try { tempDirExists = await exists('rclone', { baseDir: BaseDirectory.Temp,