Skip to content
This repository was archived by the owner on Feb 27, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.7.0-dev
v0.8.0
8 changes: 8 additions & 0 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ func download(dest, url string) error {
if err := f.Close(); err != nil {
return err
}

if _, err := os.Stat(dest); err == nil {
backup_dest := dest + ".bak"
os.Remove(backup_dest)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dang Windows problems, setting off my internal "simple race detector". I'll console myself with the thought that in Linux, it won't matter anyhow.

if err := os.Rename(dest, backup_dest); err != nil {
return err
}
}
if err := os.Rename(f.Name(), dest); err != nil {
return err
}
Expand Down