Code smell
This commit is contained in:
committed by
Jakob Borg
parent
edcfc32b1a
commit
938e287501
@@ -655,7 +655,7 @@ func (m *Model) Request(deviceID protocol.DeviceID, folder, name string, offset
|
||||
}
|
||||
|
||||
lf := r.Get(protocol.LocalDeviceID, name)
|
||||
if protocol.IsInvalid(lf.Flags) || protocol.IsDeleted(lf.Flags) {
|
||||
if lf.IsInvalid() || lf.IsDeleted() {
|
||||
if debug {
|
||||
l.Debugf("%v REQ(in): %s: %q / %q o=%d s=%d; invalid: %v", m, deviceID, folder, name, offset, size, lf)
|
||||
}
|
||||
@@ -1085,7 +1085,7 @@ func (m *Model) ScanFolderSub(folder, sub string) error {
|
||||
}
|
||||
|
||||
seenPrefix = true
|
||||
if !protocol.IsDeleted(f.Flags) {
|
||||
if !f.IsDeleted() {
|
||||
if f.IsInvalid() {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -313,10 +313,10 @@ func (p *Puller) pullerIteration(ncopiers, npullers, nfinishers int, checksum bo
|
||||
}
|
||||
|
||||
switch {
|
||||
case protocol.IsDeleted(file.Flags):
|
||||
case file.IsDeleted():
|
||||
// A deleted file or directory
|
||||
deletions = append(deletions, file)
|
||||
case protocol.IsDirectory(file.Flags):
|
||||
case file.IsDirectory():
|
||||
// A new or changed directory
|
||||
p.handleDir(file)
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user