Fixed backup reloading on Windows.

This commit is contained in:
Patrick Fairbank
2014-09-06 19:25:53 -07:00
parent e35f4157ab
commit 247d5d1fee

View File

@@ -126,6 +126,11 @@ func RestoreDbHandler(w http.ResponseWriter, r *http.Request) {
// Replace the current database with the new one.
db.Close()
err = os.Remove(eventDbPath)
if err != nil {
handleWebErr(w, err)
return
}
err = os.Rename(tempFilePath, eventDbPath)
if err != nil {
handleWebErr(w, err)