code cleanup

This commit is contained in:
olcxja 2026-10-07 16:29:40 +02:00
commit d21b873327
12 changed files with 40 additions and 213 deletions

View file

@ -265,13 +265,11 @@ function syncDesktopConfig(root) {
const dst = path.join(root, 'config', rel)
const hostHash = hashOf(src)
if (!hostHash) continue
const known = marker[rel]
if (fs.existsSync(dst) && known) {
if (fs.existsSync(dst)) {
// only a marked copy is provably ours, and only while it is untouched
const current = hashOf(dst)
// the app owns it now, or there is nothing to do
if (current !== known || current === hostHash) continue
if (current !== marker[rel] || current === hostHash) continue
}
// no marker entry: the copy is ours (seeded before the marker existed)
if (copyFromHost(src, dst, { refresh: true })) {
marker[rel] = hostHash
changed = true