forked from TrueCloudLab/restic
local backend: do not call Sync() on directory
This fails at least on Windows.
This commit is contained in:
parent
fe565e17c3
commit
35f9eae6c3
1 changed files with 1 additions and 17 deletions
|
@ -283,23 +283,7 @@ func (b *Local) Save(h backend.Handle, p []byte) (err error) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = setNewFileMode(f, fi)
|
return setNewFileMode(f, fi)
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// try to flush directory
|
|
||||||
d, err := os.Open(filepath.Dir(f))
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
err = d.Sync()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return d.Close()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stat returns information about a blob.
|
// Stat returns information about a blob.
|
||||||
|
|
Loading…
Reference in a new issue