Closed tjrocha closed 5 years ago
Rolling back change... Need to come up with an alternative solution. Fails from compiled installer...
No sure why I'm investigating, curiosity killed the cat? Looks like shutil.move() will fail if the file exists on Windows.
See here: https://docs.python.org/3.7/library/shutil.html#shutil.move "If the destination is on the current filesystem, then os.rename() is used."
Then os.rename(): https://docs.python.org/3.7/library/os.html#os.rename "On Windows, if dst exists a FileExistsError is always raised."
Looks like an os.replace() instead of shutil.move() would work.
If the software crashes while it is trying to save to an existing .fcst file, the file is emptied out and all the work contained within it is lost. Propose saving to a .temp.fcst file first before doing a rename/overwrite of the existing *.fcst file.
Hard to reproduce, the software needs to crash while doing a save.