all: Add receive only folder type (#5027)
Adds a receive only folder type that does not send changes, and where the user can optionally revert local changes. Also changes some of the icons to make the three folder types distinguishable.
This commit is contained in:
@@ -140,11 +140,11 @@ func (t readWriteTransaction) updateGlobal(gk, folder, device []byte, file proto
|
||||
if oldFile, ok := t.getFile(folder, oldGlobalFV.Device, name); ok {
|
||||
// A failure to get the file here is surprising and our
|
||||
// global size data will be incorrect until a restart...
|
||||
meta.removeFile(globalDeviceID, oldFile)
|
||||
meta.removeFile(protocol.GlobalDeviceID, oldFile)
|
||||
}
|
||||
|
||||
// Add the new global to the global size counter
|
||||
meta.addFile(globalDeviceID, newGlobal)
|
||||
meta.addFile(protocol.GlobalDeviceID, newGlobal)
|
||||
|
||||
l.Debugf(`new global for "%v" after update: %v`, file.Name, fl)
|
||||
t.Put(gk, mustMarshal(&fl))
|
||||
@@ -197,7 +197,7 @@ func (t readWriteTransaction) removeFromGlobal(gk, folder, device, file []byte,
|
||||
// didn't exist anyway, apparently
|
||||
continue
|
||||
}
|
||||
meta.removeFile(globalDeviceID, f)
|
||||
meta.removeFile(protocol.GlobalDeviceID, f)
|
||||
removed = true
|
||||
}
|
||||
fl.Versions = append(fl.Versions[:i], fl.Versions[i+1:]...)
|
||||
@@ -215,7 +215,7 @@ func (t readWriteTransaction) removeFromGlobal(gk, folder, device, file []byte,
|
||||
if f, ok := t.getFile(folder, fl.Versions[0].Device, file); ok {
|
||||
// A failure to get the file here is surprising and our
|
||||
// global size data will be incorrect until a restart...
|
||||
meta.addFile(globalDeviceID, f)
|
||||
meta.addFile(protocol.GlobalDeviceID, f)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user