An album whose folder cannot be made no longer stops the backup (closes #197)
check / check (push) Waiting to run

Each album's folder, links and JSON are written inside one try. A failure
prints `FAILED album <name>: <reason>`, lists the album's ID in the new
`failedAlbums` of the result and of `--json`, and makes `quak backup` exit 1;
the other albums and `failures.json` are still written.

An album whose folder would have another album's JSON name, ignoring case,
gets its ID. A name over 255 bytes (250 for a folder, which leaves room for
`.json`) gets the ID and is cut short between two characters by
`shortenToBytes` in `src/filename.ts`. A link's ID goes right before its
extension.

Apart from its call to `uniqueNames`, the album loop is only indented into
the try.

Model: opus-5-5
This commit is contained in:
2026-10-16 02:47:00 +00:00
parent d016dbfaa7
commit 3cabeba249
8 changed files with 473 additions and 82 deletions
+3 -1
View File
@@ -470,7 +470,9 @@ export const backupCommand = async (
}
}
return result.failed > 0 || result.undecryptableAlbums.length > 0
return result.failed > 0 ||
result.undecryptableAlbums.length > 0 ||
result.failedAlbums.length > 0
? 1
: 0;
} finally {