Fix debug and fmt poopoo
This commit is contained in:
parent
2e003e5404
commit
8818c4785b
@ -439,8 +439,8 @@ func (m *Model) Index(deviceID protocol.DeviceID, folder string, fs []protocol.F
|
|||||||
for i := 0; i < len(fs); {
|
for i := 0; i < len(fs); {
|
||||||
lamport.Default.Tick(fs[i].Version)
|
lamport.Default.Tick(fs[i].Version)
|
||||||
if ignores != nil && ignores.Match(fs[i].Name) {
|
if ignores != nil && ignores.Match(fs[i].Name) {
|
||||||
if debug{
|
if debug {
|
||||||
l.Debugln("dropping update for ignored",fs[i])
|
l.Debugln("dropping update for ignored", fs[i])
|
||||||
}
|
}
|
||||||
fs[i] = fs[len(fs)-1]
|
fs[i] = fs[len(fs)-1]
|
||||||
fs = fs[:len(fs)-1]
|
fs = fs[:len(fs)-1]
|
||||||
@ -483,7 +483,9 @@ func (m *Model) IndexUpdate(deviceID protocol.DeviceID, folder string, fs []prot
|
|||||||
for i := 0; i < len(fs); {
|
for i := 0; i < len(fs); {
|
||||||
lamport.Default.Tick(fs[i].Version)
|
lamport.Default.Tick(fs[i].Version)
|
||||||
if ignores != nil && ignores.Match(fs[i].Name) {
|
if ignores != nil && ignores.Match(fs[i].Name) {
|
||||||
l.Debugln("dropping update for ignored",fs[i])
|
if debug {
|
||||||
|
l.Debugln("dropping update for ignored", fs[i])
|
||||||
|
}
|
||||||
fs[i] = fs[len(fs)-1]
|
fs[i] = fs[len(fs)-1]
|
||||||
fs = fs[:len(fs)-1]
|
fs = fs[:len(fs)-1]
|
||||||
} else {
|
} else {
|
||||||
@ -882,7 +884,9 @@ func sendIndexTo(initial bool, minLocalVer uint64, conn protocol.Connection, fol
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ignores != nil && ignores.Match(f.Name) {
|
if ignores != nil && ignores.Match(f.Name) {
|
||||||
l.Debugln("not sending update for ignored",f)
|
if debug {
|
||||||
|
l.Debugln("not sending update for ignored", f)
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1084,7 +1088,7 @@ func (m *Model) ScanFolderSub(folder, sub string) error {
|
|||||||
|
|
||||||
if ignores != nil && ignores.Match(f.Name) {
|
if ignores != nil && ignores.Match(f.Name) {
|
||||||
// File has been ignored. Set invalid bit.
|
// File has been ignored. Set invalid bit.
|
||||||
l.Debugln("setting invalid bit on ignored",f)
|
l.Debugln("setting invalid bit on ignored", f)
|
||||||
nf := protocol.FileInfo{
|
nf := protocol.FileInfo{
|
||||||
Name: f.Name,
|
Name: f.Name,
|
||||||
Flags: f.Flags | protocol.FlagInvalid,
|
Flags: f.Flags | protocol.FlagInvalid,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user