mirror of
https://github.com/restic/restic.git
synced 2024-12-22 15:57:07 +00:00
Reset read-only flag before removing
This commit is contained in:
parent
10232155ef
commit
2644722198
1 changed files with 6 additions and 0 deletions
|
@ -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 a new issue