fix(sync): warn when pre-sync backup has no folder (was silent no-op)

This commit is contained in:
r-zakarya
2026-07-10 12:29:07 +01:00
parent bfce02ae6b
commit 9bf1e4f571
+2
View File
@@ -543,6 +543,8 @@ async function runSyncNow(_attempt) {
.replace(/[-:]/g, '').replace('T', '-').slice(0, 15); .replace(/[-:]/g, '').replace('T', '-').slice(0, 15);
const path = dir.replace(/[\\/]+$/, '') + '\\vault-presync-' + ts + '.json'; const path = dir.replace(/[\\/]+$/, '') + '\\vault-presync-' + ts + '.json';
await Bridge.writeFile(path, JSON.stringify(container, null, 2)); await Bridge.writeFile(path, JSON.stringify(container, null, 2));
} else {
toast('Pre-sync backup skipped — set an auto-backup folder first', 'warning');
} }
} catch (_) { /* best-effort */ } } catch (_) { /* best-effort */ }
} }