mirror of
https://github.com/Picocrypt/Picocrypt.git
synced 2026-03-11 14:04:23 +00:00
fix: delete a partially extracted file if run out of space
This commit is contained in:
parent
46b557e3ef
commit
445cd48e53
1 changed files with 1 additions and 0 deletions
|
|
@ -2438,6 +2438,7 @@ func unpackArchive(zipPath string) error {
|
|||
_, writeErr := dstFile.Write(buffer[:n])
|
||||
if writeErr != nil {
|
||||
dstFile.Close()
|
||||
os.Remove(dstFile.Name())
|
||||
return writeErr
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue