mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 06:51:26 +12:00
Fixes pkg overwriting files without the PKG_FILE_ENTRY_OVERWRITE flag
This commit is contained in:
parent
dcfe8e1abd
commit
d410494a7d
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
const bool did_overwrite = fs::is_file(path);
|
||||||
|
|
||||||
|
if (did_overwrite && (entry.type&PKG_FILE_ENTRY_OVERWRITE) == 0)
|
||||||
|
{
|
||||||
|
LOG_NOTICE(LOADER, "Didn't overwrite %s", name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (fs::file out{ path, fs::rewrite })
|
if (fs::file out{ path, fs::rewrite })
|
||||||
{
|
{
|
||||||
for (u64 pos = 0; pos < entry.file_size; pos += BUF_SIZE)
|
for (u64 pos = 0; pos < entry.file_size; pos += BUF_SIZE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue