Support Board
Date/Time: Wed, 15 Jan 2025 18:05:41 +0000
Post From: GlobalSymbolSettings.xml should be written out with a temp file then replaced on success
[2017-07-03 07:55:25] |
i960 - Posts: 360 |
Well I'm stating right now there's a problem with it and I've seen it happen multiple times. Just today I had yet another partial write out of GlobalSymbolSettings.xml pretty much corrupting any custom additions I made to it since the last time I had to redownload the entire thing again. Look, just look at the code. If it's writing to the active filename and not verifying the write was successful it really doesn't matter what the reason was that something went wrong (e.g. crash, disk full, etc) - not using a temp file means corrupted or partially written files *will happen*. Using a tempfile means that said write can be verified as having been completed and then the move/replace is atomic and safe. For the record, this was not a system crash it was an SC crash on shutdown (exit). Presumably SC is writing out GlobalSymbolSettings.xml on exit, but the real issue is the lack of a tempfile. Date Time Of Last Edit: 2017-07-03 07:56:37
|