mirror of
https://github.com/restic/restic.git
synced 2026-10-17 06:58:12 +00:00
local backend: do not call Sync() on directory
This fails at least on Windows.
This commit is contained in:
1 parent
fe565e17c3
commit
35f9eae6c3
1 file changed
+1
-17
+1
-17
@@ -283,23 +283,7 @@ func (b *Local) Save(h backend.Handle, p []byte) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
err = 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()
|
||||
return setNewFileMode(f, fi)
|
||||
}
|
||||
|
||||
// Stat returns information about a blob.
|
||||
|
||||
Reference in new issue
Block a user