-
Notifications
You must be signed in to change notification settings - Fork 617
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
Add warning on cemu flatpak for when you use a Custom MLC path without filesystem permissions #1439
Comments
There is already code for this. In the snippet you posted there is this check. There is a similar check each time you start Cemu and it should show an error message if it can't write to MLC. So maybe the check doesn't work correctly for some reason. I was able to replicate this on Windows by making the mlc folder partially read-only and it would just silently ignore it instead of showing the error. I'll look deeper into this when I have some spare time There is also a secondary problem of the flatpak version not granting write access, but I am not sure if this is due to wxWidgets not properly supporting portals. |
Thank you for the response, I see I didn't notice that check, but I tested it and it is working: The reason the check fails to stop the issue I mentioned is because it only checks on folder creation, if it's unable to create the folder because it doesn't have write access then errors out as intended. But if the MLC folder already exists and already has the proper structure from a previous cemu installation for example, then there is not code to stop it from using that folder. The same check happens later but for when the MLC folder exists bust it has incorrect file structure/the folder is empty, but it doesn't stop anything if the file structure is correct. Cemu/src/gui/GeneralSettings2.cpp Lines 2030 to 2034 in eca7374
|
934cb54 adds a dummy write to see if it can actually write to MLC. Checked each time Cemu launches. It will take a while until this arrives on flathub, so I'll leave the issue open for now. |
Your suggestion
This falls under a niche feature but I believe it's a worthwhile addition. Recently I switched to the cemu flatpak and I set a custom MLC path pointing to my old MLC folder location, but I forgot to give cemu flatpak write permissions with filesystem access. I played a game for a few hours, saved my progress and closed cemu, when I came back the next day my new saves were gone, with only the old saves remaining, I was very confused but after some testing I realized what was happening.
My suggestion is to add a warning for when you're using a cemu flatpak and it doesn't have write access to that folder so this issue doesn't happen. Similar to the warnings you already get when changing the MLC path:
Cemu/src/gui/GeneralSettings2.cpp
Lines 1999 to 2044 in eca7374
Warn the user that cemu flatpak doesn't have write access to that location, ask them to give it write access and ask them if they're sure they want to use that location as the custom MLC path. Or just refuse to change the custom path to that location until the user gives cemu write permissions like some other flatpaks do.
I believe the MLC folder is the only thing that the user can put outside of the flatpak sandbox that needs write access, but if there are others my idea would be to have the same warning.
The text was updated successfully, but these errors were encountered: