diff options
Diffstat (limited to 'Source/Core/Common/Src/FileUtil.cpp')
| -rw-r--r-- | Source/Core/Common/Src/FileUtil.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index d7b248a722..d74c99b7a2 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -512,12 +512,24 @@ bool DeleteDirRecursively(const std::string &directory) if (IsDirectory(newPath)) { if (!DeleteDirRecursively(newPath)) + { + #ifndef _WIN32 + closedir(dirp); + #endif + return false; + } } else { if (!File::Delete(newPath)) + { + #ifndef _WIN32 + closedir(dirp); + #endif + return false; + } } #ifdef _WIN32 |
