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

Create emulator directories after changing dev_*** directories #6707

Merged
merged 2 commits into from Oct 5, 2019

Conversation

CookiePLMonster
Copy link
Contributor

Corrects the case where it was (usually) not possible to install games/firmware after changing path dev_hdd0 (and potentially others) in settings, and required a restart instead.

Reproduction steps

  1. Launch RPCS3 with $(EmulatorDir) set to eg. D\RPCS3`.
  2. Open Virtual File System settings.
  3. Change $(EmulatorDir) to any new empty folder, eg. D:\RPCS3\NewDirForFiles and click Save.
  4. Attempt to install any game.

Observed result

Installation fails, because directories are not created recursively and a parent directory does not exist.

Expected result

Installation proceeds as normal.

@Nekotekina
Copy link
Member

Could just patch pkg_install function to use create_path.

@CookiePLMonster
Copy link
Contributor Author

That would only address the immediate problem, and possibly only one broken case out of numerous ones. The more abstract issue here is that changing VFS paths leaves the host filesystem in the state which is different to the startup state fresh after booting the emulator. I would say addressing this instead of patching each broken case is cleaner and safer.

@Nekotekina
Copy link
Member

Nekotekina commented Oct 4, 2019

No... it totally makes sense for pkg_install to create a full path. On the other hand, CreateDirectories isn't extremely useful in being cut from Emu.Init. Just call Emu.Init after VFS dialog changes (maybe with a condition making sure that Emu status is Stopped).

@CookiePLMonster
Copy link
Contributor Author

CookiePLMonster commented Oct 4, 2019

No... it totally makes sense for pkg_install to create full path.

It does, but again only addresses one issue while there may be more. That said, it may be worth it making it create the path recursively regardless of my change.

Just call Emu.Init after VFS dialog changes (with condition if emu status is Stopped).

I guess I can do that - I didn't do that initially to avoid possible side effects. I'll look into it.

EDIT:
I see now - Emulator::Init is called pretty often, so indeed seems to be safe to just call it instead of factorizing its part out.

@Nekotekina Nekotekina merged commit f5d8110 into RPCS3:master Oct 5, 2019
@CookiePLMonster CookiePLMonster deleted the vfs-create-dirs branch October 5, 2019 13:24
kd-11 pushed a commit to kd-11/rpcs3 that referenced this pull request Nov 2, 2019
…#6707)

* Make pkg_install create path to the game recursively

* Create emulator directories after changing dev_*** dir paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants