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
1 changed files with 6 additions and 0 deletions

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