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
Pkg installation fix #2990
Pkg installation fix #2990
Conversation
@RipleyTom, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Nekotekina to be a potential reviewer. |
rpcs3/Crypto/unpkg.cpp
Outdated
@@ -228,45 +228,51 @@ bool pkg_install(const fs::file& pkg_f, const std::string& dir, atomic_t<double> | |||
|
|||
const bool did_overwrite = fs::is_file(path); | |||
|
|||
if (fs::file out{ path, fs::rewrite }) | |||
if (did_overwrite && entry.type&PKG_FILE_ENTRY_OVERWRITE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong condition. Also redo without moving the other code.
rpcs3/Crypto/unpkg.cpp
Outdated
@@ -228,6 +228,12 @@ bool pkg_install(const fs::file& pkg_f, const std::string& dir, atomic_t<double> | |||
|
|||
const bool did_overwrite = fs::is_file(path); | |||
|
|||
if (did_overwrite && (entry.type&PKG_FILE_ENTRY_OVERWRITE == 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must be (entry.type & PKG_FILE_ENTRY_OVERWRITE) == 0
Fixes pkg overwriting files without the PKG_FILE_ENTRY_OVERWRITE flag