all: Update metadata modtime on delete (ref #6284) (#6315)

This records the time a file was marked as deleted. It will, in the
future, aid in garbage collecting old files.
This commit is contained in:
Jakob Borg
2020-02-10 10:48:30 +01:00
committed by GitHub
parent b4064e07dc
commit b61da487e4
3 changed files with 18 additions and 17 deletions
+1 -2
View File
@@ -107,8 +107,7 @@ func (f *receiveOnlyFolder) Revert() {
fi = protocol.FileInfo{
Name: fi.Name,
Type: fi.Type,
ModifiedS: fi.ModifiedS,
ModifiedNs: fi.ModifiedNs,
ModifiedS: time.Now().Unix(),
ModifiedBy: f.shortID,
Deleted: true,
Version: protocol.Vector{}, // if this file ever resurfaces anywhere we want our delete to be strictly older