mirror of
https://github.com/openziti/ziti.git
synced 2026-10-12 15:28:05 +00:00
Remove file before extracting when using ziti use
This commit is contained in:
@@ -377,6 +377,10 @@ func UnTargz(tarball, target string, onlyFiles []string) error {
|
||||
return err
|
||||
}
|
||||
continue
|
||||
} else {
|
||||
if err = os.Remove(path); err != nil {
|
||||
fmt.Printf("error removing [%s] (%v)", path, err)
|
||||
}
|
||||
}
|
||||
|
||||
file, err := os.OpenFile(path, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, info.Mode())
|
||||
|
||||
Reference in New Issue
Block a user