Better VM runtime logic
This commit is contained in:
parent
58039acc3c
commit
7b5391f4d8
7 changed files with 165 additions and 220 deletions
|
|
@ -27,10 +27,8 @@ func (s *Storage) download(url string, hash []byte, out string, applyReaderMiddl
|
|||
_, err := os.Stat(out)
|
||||
if err == nil {
|
||||
return errors.Wrap(err, "file already exists")
|
||||
} else {
|
||||
if !errors.Is(err, os.ErrNotExist) {
|
||||
return errors.Wrap(err, "stat out path")
|
||||
}
|
||||
} else if !errors.Is(err, os.ErrNotExist) {
|
||||
return errors.Wrap(err, "stat out path")
|
||||
}
|
||||
|
||||
f, err := os.OpenFile(out, os.O_CREATE|os.O_WRONLY, 0400)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue