Do not unlink file while it is still open
- inside RunJob() there is a deferred function which will remove the entire temporary directory in which images are created, including the streamOptimized file - inside testBootUsingVMware(), which wants to use this function, there is already a deferred function which removes the converted image
This commit is contained in:
parent
e7aa9c10c2
commit
3292b5eb68
1 changed files with 0 additions and 4 deletions
|
|
@ -18,9 +18,5 @@ func OpenAsStreamOptimizedVmdk(imagePath string) (*os.File, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = os.Remove(newPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return f, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue