mirror of
https://github.com/restic/restic.git
synced 2025-12-08 06:09:56 +00:00
backend/local: fix "operation not supported" when unlocking
If the repo is on a mounted folder that doesn't support chmod (like SMB), it was causing an "operation not supported" error when trying to chmod 666 a file before deleting it. But it isn't generally needed before deleting a file (the folder permissions matter there, not the file permissions). So, just drop it.
This commit is contained in:
parent
71432c7f4b
commit
7f3e3b77ce
4 changed files with 26 additions and 7 deletions
|
|
@ -52,3 +52,7 @@ func setFileReadonly(f string, mode os.FileMode) error {
|
|||
|
||||
return err
|
||||
}
|
||||
|
||||
func removeFile(f string) error {
|
||||
return os.Remove(f)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue