Skip to content

Commit

Permalink
Fix overwriting of rfm.conf on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
wilriker committed Jul 1, 2019
1 parent 8664776 commit 8360f30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config.go
Expand Up @@ -137,6 +137,9 @@ func SaveConfigs() error {
return err
}

// Explicitely close the file before renaming
f.Close()

// If we get here rename the temporary file to the real name
return os.Rename(f.Name(), filepath.Join(h, ConfigFileName))
}

0 comments on commit 8360f30

Please sign in to comment.