builder/vmware: correct logic in cehcking if file is still there

pull/919/head
Mitchell Hashimoto 12 years ago
parent 6211cd2028
commit 8766a93245

@ -50,7 +50,7 @@ func (stepCleanFiles) Run(state multistep.StateBag) multistep.StepAction {
ui.Message(fmt.Sprintf("Deleting: %s", path))
if err = dir.Remove(path); err != nil {
// Only report the error if the file still exists
if _, serr := os.Stat(path); serr == nil || os.IsNotExist(serr) {
if _, serr := os.Stat(path); serr == nil || !os.IsNotExist(serr) {
state.Put("error", err)
return multistep.ActionHalt
}

Loading…
Cancel
Save