Skip to content

Commit

Permalink
Added a primitive backup system
Browse files Browse the repository at this point in the history
  • Loading branch information
KodiCraft committed Jul 19, 2022
1 parent 6e80bed commit 5cbe1f0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions vrmlUpdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def set_server(path: str, ip: str, wls: bool) -> None:
return

# Replace the original .wrl with the new .wrl
os.remove(path)

os.rename('temp.wrl', path)
os.rename(path, path + ".OLD")
os.rename('temp.wrl', path)
# If we successfully renamed here, we can delete the old file
os.remove(path + ".OLD")

0 comments on commit 5cbe1f0

Please sign in to comment.