From 87d982982dd8b1e5ea7a89dcc89f860aa34db03b Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 25 Aug 2017 19:10:13 +0200 Subject: [PATCH] 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. --- Source/Core/Common/FileUtil.cpp | 4 ++-- 1 file 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); }