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

Qt: Prevent savestate load/save on empty filename #11809

Conversation

malleoz
Copy link
Contributor

@malleoz malleoz commented May 2, 2023

This fixes the following behavior I encountered.

  1. Emulation > Save State > Save State to File. Close dialog without setting filename
  2. Observe on-screen message "Saving state to " (no filepath given), and observe xxxxx.tmp file being created in main Dolphin directory
  3. Repeat step 1 and 2 to observe more .tmp files being created
  4. Start Movie Recording, repeat step 1 to now also see blank ".dtm" file present

Looks like Dolphin will always write savestate data to a temp file and then try to rename it. Ultimately when the provided filename is blank (because the QFileDialog was closed without the name being set) the rename will fail and the temp file will remain.

I figured this filename check should also be done for the load state scenario, as all this does is prevent a load failure in LoadAs().

Copy link
Contributor

@AdmiralCurtiss AdmiralCurtiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me.

@AdmiralCurtiss AdmiralCurtiss merged commit 2fa84c7 into dolphin-emu:master May 2, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants