mirror of
https://github.com/RPCS3/rpcs3
synced 2024-09-06 08:30:06 +00:00
MSELF extractor: Ensure the files' dwellings
This commit is contained in:
parent
2b325de680
commit
de988f6a76
|
@ -63,6 +63,12 @@ bool extract_mself(const std::string& file, const std::string& extract_to)
|
|||
mself.seek(pos);
|
||||
mself.read(buffer.data(), rec.size);
|
||||
|
||||
if (!fs::create_path(fs::get_parent_dir(extract_to + name)))
|
||||
{
|
||||
mself_log.error("Error creating directory %s (%s)", fs::get_parent_dir(extract_to + name), fs::g_tls_error);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!fs::write_file(extract_to + name, fs::rewrite, buffer))
|
||||
{
|
||||
mself_log.error("Error creating %s (%s)", extract_to + name, fs::g_tls_error);
|
||||
|
|
Loading…
Reference in a new issue