dolphin/Source/Core
Dentomologist 1734cf55d8 Fix file rename errors on Windows
On Windows, when the Rename function fails to replace an existing file
it will now retry the operation multiple times with increasingly long
delays between attempts.  This fixes transient rename failures.

I've been getting sporadic yet annoyingly frequent errors saying:
'IOS_FS: Failed to rename temporary FST file'
These typically appear on startup but I've also gotten them randomly.

Investigation shows this happens when the Windows ReplaceFile function
returns the error ERROR_UNABLE_TO_REMOVE_REPLACED.  That happens in the
context of using ReplaceFile to perform an atomic file overwrite, which
is required when saving updates to a file to avoid corruption.  The
error mainly happens with the /Wii/fst.bin file but I've seen it
happen with multiple other files as well.

I haven't been able to definitively pin down why the error occurs,
though online discussions suggest antivirus scanning may be a major
culprit.  That said, I've excluded the Dolphin folder from Windows
Defender scans to no avail and don't have any other antivirus running,
so this is likely to be a problem others are experiencing as well.

The number and duration of retry delays is arbitrary but I feel like a
combined second or so in the worst case is an acceptable tradeoff for
the reduction (actually elimination in my experience) of those errors.
This is even more true when you consider the time it takes to read and
dismiss the error dialogs.
2020-11-25 16:12:58 -08:00
..
AudioCommon Merge pull request #9071 from orbea/cmake 2020-10-26 18:48:42 +01:00
Common Fix file rename errors on Windows 2020-11-25 16:12:58 -08:00
Core Android: Fix rotating EmulationActivity after boot fails 2020-11-09 10:38:49 +01:00
DiscIO Merge pull request #9204 from fbastos1/master 2020-11-12 14:43:35 +01:00
DolphinNoGUI Clean up screen saver inhibition and apply setting change immediately. 2020-10-18 16:31:48 -05:00
DolphinQt Fix dereferencing nullptr BootParameters 2020-11-06 09:34:53 +01:00
InputCommon InputCommon: Migrate over to fmt-capable panic alerts 2020-11-12 02:29:26 -05:00
MacUpdater Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
UICommon UICommon: Migrate logging over to fmt 2020-11-09 02:39:55 -05:00
UpdaterCommon Merge pull request #8846 from nyanpasu64/fix-cmake-zlib 2020-10-22 01:11:27 +02:00
VideoBackends Vulkan: Migrate logging over to fmt 2020-11-09 03:26:16 -05:00
VideoCommon ShaderGenCommon: Rename WriteFmt() to Write() 2020-11-09 02:31:49 -05:00
WinUpdater DolphinQt: Handle non-ASCII characters in Windows cmd arguments 2020-09-21 17:26:29 +02:00
CMakeLists.txt WinUpdater: Add CMakeLists.txt 2019-05-08 23:59:04 +02:00