mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
Fixed backup reloading on Windows.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user