code cleanup
This commit is contained in:
parent
4680d7f014
commit
d21b873327
12 changed files with 40 additions and 213 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue