mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
Fix possible fs::create_path recursion overflow
This commit is contained in:
parent
8b4f3fa775
commit
9afa960979
1 changed files with 2 additions and 2 deletions
|
@ -683,9 +683,9 @@ bool fs::create_path(const std::string& path)
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Workaround: don't call is_dir with naked drive letter
|
// Workaround: don't call is_dir with naked drive letter
|
||||||
if (!parent.empty() && parent.back() != ':' && !is_dir(parent) && !create_path(parent))
|
if (parent.size() < path.size() && parent.back() != ':' && !is_dir(parent) && !create_path(parent))
|
||||||
#else
|
#else
|
||||||
if (!parent.empty() && !is_dir(parent) && !create_path(parent))
|
if (parent.size() < path.size() && !is_dir(parent) && !create_path(parent))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue