forked from TrueCloudLab/restic
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.open[fn] = nil
|
||||||
b.mu.Unlock()
|
b.mu.Unlock()
|
||||||
|
|
||||||
|
// reset read-only flag
|
||||||
|
err := os.Chmod(fn, 0666)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
return os.Remove(fn)
|
return os.Remove(fn)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue