Skip to content

Commit

Permalink
Fix segfault when stripping Godep workspace
Browse files Browse the repository at this point in the history
When deleting 'Godeps/_workspace' folders skip recursing into the folder.
  • Loading branch information
databus23 committed Oct 31, 2018
1 parent 9ef6ca3 commit ec376ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion godep/strip/strip.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ func stripGodepWorkspaceHandler(path string, info os.FileInfo, err error) error
godepMark[pp] = true

msg.Info("Removing: %s", path)
return os.RemoveAll(path)
if err := os.RemoveAll(path); err != nil {
return err
}
return filepath.SkipDir
}

msg.Debug("%s is not a directory. Skipping removal", path)
Expand Down

0 comments on commit ec376ea

Please sign in to comment.