lib/config: Improve debug logging around folder marker

This commit is contained in:
Jakob Borg 2017-10-22 00:04:51 +02:00
parent 622b614f31
commit d65f1fb08a

View File

@ -94,12 +94,10 @@ func (f *FolderConfiguration) CreateMarker() error {
if err != nil {
return err
}
if dir, err := fs.Open("."); err == nil {
if serr := dir.Sync(); err != nil {
l.Debugln("fsync %q failed: %v", ".", serr)
}
} else {
l.Infof("fsync %q failed: %v", ".", err)
if dir, err := fs.Open("."); err != nil {
l.Debugln("folder marker: open . failed:", err)
} else if err := dir.Sync(); err != nil {
l.Debugln("folder marker: fsync . failed:", err)
}
fs.Hide(".stfolder")
}