mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +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()
|
||||
|
||||
if _, err = filesystem.Stat("."); fs.IsNotExist(err) {
|
||||
if err = filesystem.MkdirAll(".", permBits); err != nil {
|
||||
l.Warnf("Creating directory for %v: %v", f.Description(), err)
|
||||
}
|
||||
err = filesystem.MkdirAll(".", permBits)
|
||||
}
|
||||
|
||||
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
|
||||
// it'll show up as errored later.
|
||||
|
||||
// Directory permission bits. Will be filtered down to something
|
||||
// sane by umask on Unixes.
|
||||
|
||||
cfg.CreateRoot()
|
||||
|
||||
if err := cfg.CreateMarker(); err != nil {
|
||||
l.Warnln("Creating folder marker:", err)
|
||||
if err := cfg.CreateRoot(); err != nil {
|
||||
l.Warnln("Failed to create folder root directory", err)
|
||||
} else if err = cfg.CreateMarker(); err != nil {
|
||||
l.Warnln("Failed to create folder marker:", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user