mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
Reset read-only flag before removing
This commit is contained in:
parent
10232155ef
commit
2644722198
@ -267,6 +267,12 @@ func (b *Local) Remove(t backend.Type, name string) error {
|
||||
b.open[fn] = nil
|
||||
b.mu.Unlock()
|
||||
|
||||
// reset read-only flag
|
||||
err := os.Chmod(fn, 0666)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return os.Remove(fn)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user