mirror of
https://github.com/restic/restic.git
synced 2026-05-28 04:35:41 -04:00
fs: Clone(): open the destination with O_TRUNC
This commit is contained in:
parent
eb2a4d29f8
commit
2b6cb44da5
1 changed files with 1 additions and 1 deletions
|
|
@ -143,7 +143,7 @@ func Clone(srcName, destName string) (cloned bool, err error) {
|
|||
_ = src.Close()
|
||||
}()
|
||||
|
||||
dest, err := OpenFile(destName, O_CREATE|O_WRONLY|O_NOFOLLOW, 0600)
|
||||
dest, err := OpenFile(destName, O_CREATE|O_TRUNC|O_WRONLY|O_NOFOLLOW, 0600)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue