mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +00:00
lib/model: Set mod. time after writing trailer in shortcut (ref #7992)
This commit is contained in:
parent
8f8e8a9285
commit
951b058952
@ -1227,8 +1227,6 @@ func (f *sendReceiveFolder) shortcutFile(file protocol.FileInfo, dbUpdateChan ch
|
||||
}
|
||||
}
|
||||
|
||||
f.mtimefs.Chtimes(file.Name, file.ModTime(), file.ModTime()) // never fails
|
||||
|
||||
// Still need to re-write the trailer with the new encrypted fileinfo.
|
||||
if f.Type == config.FolderTypeReceiveEncrypted {
|
||||
err = inWritableDir(func(path string) error {
|
||||
@ -1249,6 +1247,8 @@ func (f *sendReceiveFolder) shortcutFile(file protocol.FileInfo, dbUpdateChan ch
|
||||
}
|
||||
}
|
||||
|
||||
f.mtimefs.Chtimes(file.Name, file.ModTime(), file.ModTime()) // never fails
|
||||
|
||||
dbUpdateChan <- dbUpdateJob{file, dbUpdateShortcutFile}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user