2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 19:08:55 +00:00

Reset read-only flag before removing

This commit is contained in:
Alexander Neumann 2015-08-19 22:02:47 +02:00
parent 10232155ef
commit 2644722198

View File

@ -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)
}