mirror of
https://github.com/beclab/Olares
synced 2026-05-24 01:08:23 +00:00
fix(cli): trucate file before untar (#1644)
This commit is contained in:
parent
604b2191ce
commit
c05f82c4bb
1 changed files with 1 additions and 1 deletions
|
|
@ -344,7 +344,7 @@ func Untar(src, dst string) error {
|
|||
}
|
||||
}
|
||||
|
||||
file, err := os.OpenFile(dstPath, os.O_CREATE|os.O_RDWR, os.FileMode(hdr.Mode))
|
||||
file, err := os.OpenFile(dstPath, os.O_CREATE|os.O_RDWR|os.O_TRUNC, os.FileMode(hdr.Mode))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue