WinUpdater: Defer modifying any files until Updater.exe #11189
Merged
+63
−32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Fixes https://bugs.dolphin-emu.org/issues/12151
IMO better way to fix the issue than #10990
I (hopefully) haven't modified the logic at all on macos - I'm not sure if it should be or not.
The core of the problem was that
File::Copy(updater_path, reloc_updater_path);was failing silently. This is actually a pervasive problem in dolphin: many uses of filesystem-related Common functions have no error handling by their callers. I tried adding[[nodiscard]]to funcs in FileUtil but fixing such issues quickly became a large change that I'm not necessarily concerned with at the moment (maybe someone else wants to do it?). For instance, the macos path usesFile::CopyDirin here and that func doesn't even return success indication at all (and the chmod result isn't checked, etc...).