mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 23:00:58 +00:00
Emit info level log when deleting directory fails
This commit is contained in:
parent
b2cf28efdd
commit
d65302742c
@ -343,17 +343,17 @@ func (p *Puller) handleDir(file protocol.FileInfo) {
|
|||||||
if err = osutil.InWritableDir(mkdir, realName); err == nil {
|
if err = osutil.InWritableDir(mkdir, realName); err == nil {
|
||||||
p.model.updateLocal(p.folder, file)
|
p.model.updateLocal(p.folder, file)
|
||||||
} else {
|
} else {
|
||||||
l.Infof("Puller (folder %q, file %q): %v", p.folder, file.Name, err)
|
l.Infof("Puller (folder %q, dir %q): %v", p.folder, file.Name, err)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Weird error when stat()'ing the dir. Probably won't work to do
|
// Weird error when stat()'ing the dir. Probably won't work to do
|
||||||
// anything else with it if we can't even stat() it.
|
// anything else with it if we can't even stat() it.
|
||||||
l.Infof("Puller (folder %q, file %q): %v", p.folder, file.Name, err)
|
l.Infof("Puller (folder %q, dir %q): %v", p.folder, file.Name, err)
|
||||||
return
|
return
|
||||||
} else if !info.IsDir() {
|
} else if !info.IsDir() {
|
||||||
l.Infof("Puller (folder %q, file %q): should be dir, but is not", p.folder, file.Name)
|
l.Infof("Puller (folder %q, dir %q): should be dir, but is not", p.folder, file.Name)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,7 +366,7 @@ func (p *Puller) handleDir(file protocol.FileInfo) {
|
|||||||
} else if err := os.Chmod(realName, mode); err == nil {
|
} else if err := os.Chmod(realName, mode); err == nil {
|
||||||
p.model.updateLocal(p.folder, file)
|
p.model.updateLocal(p.folder, file)
|
||||||
} else {
|
} else {
|
||||||
l.Infof("Puller (folder %q, file %q): %v", p.folder, file.Name, err)
|
l.Infof("Puller (folder %q, dir %q): %v", p.folder, file.Name, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,6 +376,8 @@ func (p *Puller) deleteDir(file protocol.FileInfo) {
|
|||||||
err := osutil.InWritableDir(os.Remove, realName)
|
err := osutil.InWritableDir(os.Remove, realName)
|
||||||
if err == nil || os.IsNotExist(err) {
|
if err == nil || os.IsNotExist(err) {
|
||||||
p.model.updateLocal(p.folder, file)
|
p.model.updateLocal(p.folder, file)
|
||||||
|
} else {
|
||||||
|
l.Infof("Puller (folder %q, dir %q): delete: %v", p.folder, file.Name, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user