mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
lib/config, lib/model: Don't warn and return error (#4997)
This commit is contained in:
parent
b7234785f8
commit
1e2732aa21
@ -190,9 +190,7 @@ func (f *FolderConfiguration) CreateRoot() (err error) {
|
|||||||
filesystem := f.Filesystem()
|
filesystem := f.Filesystem()
|
||||||
|
|
||||||
if _, err = filesystem.Stat("."); fs.IsNotExist(err) {
|
if _, err = filesystem.Stat("."); fs.IsNotExist(err) {
|
||||||
if err = filesystem.MkdirAll(".", permBits); err != nil {
|
err = filesystem.MkdirAll(".", permBits)
|
||||||
l.Warnf("Creating directory for %v: %v", f.Description(), err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
@ -231,13 +231,10 @@ func (m *Model) startFolderLocked(folder string) config.FolderType {
|
|||||||
// if these things don't work, we still want to start the folder and
|
// if these things don't work, we still want to start the folder and
|
||||||
// it'll show up as errored later.
|
// it'll show up as errored later.
|
||||||
|
|
||||||
// Directory permission bits. Will be filtered down to something
|
if err := cfg.CreateRoot(); err != nil {
|
||||||
// sane by umask on Unixes.
|
l.Warnln("Failed to create folder root directory", err)
|
||||||
|
} else if err = cfg.CreateMarker(); err != nil {
|
||||||
cfg.CreateRoot()
|
l.Warnln("Failed to create folder marker:", err)
|
||||||
|
|
||||||
if err := cfg.CreateMarker(); err != nil {
|
|
||||||
l.Warnln("Creating folder marker:", err)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user