show progress for imports and deletions

This commit is contained in:
olcxja 2026-10-02 15:19:00 +02:00
commit 5e342b6fe5
13 changed files with 343 additions and 115 deletions

View file

@ -58,7 +58,9 @@ const DIRS = {
// the bundle does not ship (user-added languages) are left untouched.
function filesDiffer(a, b) {
try {
return !fs.readFileSync(a).equals(fs.readFileSync(b))
// compare as text on purpose: Buffer.equals() throws on a string, and that
// throw was read as "differs", so every boot recopied every translation
return fs.readFileSync(a, 'utf8') !== fs.readFileSync(b, 'utf8')
} catch {
return true // target missing/unreadable -> needs a (re)copy
}