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

Pkg installation fix #2990

Merged
merged 3 commits into from Jul 13, 2017
Merged

Pkg installation fix #2990

merged 3 commits into from Jul 13, 2017

Conversation

RipleyTom
Copy link
Contributor

Fixes pkg overwriting files without the PKG_FILE_ENTRY_OVERWRITE flag

@mention-bot
Copy link

@RipleyTom, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Nekotekina to be a potential reviewer.

@@ -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)
Copy link
Member

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.

@@ -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))
Copy link
Member

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

@Nekotekina Nekotekina merged commit d410494 into RPCS3:master Jul 13, 2017
@RipleyTom RipleyTom deleted the PkgFix branch September 3, 2017 13:27
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

4 participants