diff options
| author | JosJuice <josjuice@gmail.com> | 2017-08-25 19:10:13 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2017-08-25 19:14:14 +0200 |
| commit | 87d982982dd8b1e5ea7a89dcc89f860aa34db03b (patch) | |
| tree | fb18b330924d614c68f637a6ff76ea38b28e2de1 /Source/Core/Common/FileUtil.cpp | |
| parent | d1223b6472d9c72cd9f30cbcab97b7e05e4110e1 (diff) | |
Fix regression in File::CopyDir
This apparently fixes https://bugs.dolphin-emu.org/issues/10499 somehow.
The first changed line of this commit is just for performance - the
second changed line is where the difference in behavior is.
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
| -rw-r--r-- | Source/Core/Common/FileUtil.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 84647fd4e9..78141d6095 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -564,11 +564,11 @@ void CopyDir(const std::string& source_path, const std::string& dest_path, bool File::CreateFullPath(dest + DIR_SEP); CopyDir(source, dest, destructive); } - else if (!Exists(dest) && !destructive) + else if (!destructive && !Exists(dest)) { Copy(source, dest); } - else + else if (destructive) { Rename(source, dest); } |
