Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UpdaterCommon: Copy content file to a temporary file before renaming on macOS #10419

Merged
merged 1 commit into from Jan 31, 2022

Conversation

OatmealDome
Copy link
Member

@OatmealDome OatmealDome commented Jan 30, 2022

This fixes an issue with the auto updater that wasn't noticed until now.

On macOS, we rename files instead of copying them to avoid a quirk in the kernel's code signature cache (#9858).

#10297 added two files: RPBJ01r1.ini‎‎ and RPBJ01r2.ini‎‎. These both have the same hash, so they have the same content file name. This caused the updater to break when updating RPBJ01r2.ini‎‎, as the content file for RPBJ01r1.ini‎‎ would be moved into the new path, making it impossible for RPBJ01r2.ini‎‎ to be updated as the content file would no longer exist.

To fix this, we copy the content file to a temporary file and then move the temporary file to the target path.

Unfortunately, builds after #9858 will not be able to update to builds after #10297. They will need to do this manually.

@JMC47 JMC47 merged commit 8e21495 into dolphin-emu:master Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants