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

vita3k/packages: Handle fs errors when installing pkg #3293

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ihopeitdoes
Copy link

  • Fixes possible crash when installing pkg to disk with low storage space.
  • I'm aware of decrypt_fself() in sce_utils.cpp which has a similar problem, which also seems to be very optimistic about it's file operations. I'll get to it eventually.
  • Feel free to nitpick, I don't know if my "fix" is really the best solution, I kind of just went off what was already there.

Consideration:

  • Update lang "pkg_install/failed_install_package" message to mention something along the lines of "check if there is enough storage space as well"

vita3k/packages/src/pkg.cpp Outdated Show resolved Hide resolved
@ihopeitdoes ihopeitdoes force-pushed the master branch 4 times, most recently from 1a3a3a9 to 12d5c50 Compare May 20, 2024 16:42
@ihopeitdoes ihopeitdoes marked this pull request as ready for review May 21, 2024 10:31
@Macdu
Copy link
Contributor

Macdu commented May 21, 2024

While using the non-throwing version, you also changed the call from fs::create_directories to fs::create_directory. The latter will also return an error if the parent directory does not exist (while the former just creates it). I'm not entirely sure if this can happen, but is there a reason for it?

@ihopeitdoes
Copy link
Author

While using the non-throwing version, you also changed the call from fs::create_directories to fs::create_directory. The latter will also return an error if the parent directory does not exist (while the former just creates it). I'm not entirely sure if this can happen, but is there a reason for it?

Typo, had it fixed locally forgot to push

@@ -359,4 +388,4 @@ bool install_pkg(const fs::path &pkg_path, EmuEnvState &emuenv, std::string &p_z
create_license(emuenv, zRIF);
progress_callback(100);
return true;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants