mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Fix CopyDir to not require source and dest paths to end with "/".
This commit is contained in:
parent
a225426510
commit
a0a80c9a9c
@ -627,14 +627,11 @@ void CopyDir(const std::string &source_path, const std::string &dest_path)
|
|||||||
if (virtualName == "." || virtualName == "..")
|
if (virtualName == "." || virtualName == "..")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
std::string source, dest;
|
std::string source = source_path + DIR_SEP + virtualName;
|
||||||
source = source_path + virtualName;
|
std::string dest = dest_path + DIR_SEP + virtualName;
|
||||||
dest = dest_path + virtualName;
|
|
||||||
if (IsDirectory(source))
|
if (IsDirectory(source))
|
||||||
{
|
{
|
||||||
source += '/';
|
if (!File::Exists(dest)) File::CreateFullPath(dest + DIR_SEP);
|
||||||
dest += '/';
|
|
||||||
if (!File::Exists(dest)) File::CreateFullPath(dest);
|
|
||||||
CopyDir(source, dest);
|
CopyDir(source, dest);
|
||||||
}
|
}
|
||||||
else if (!File::Exists(dest)) File::Copy(source, dest);
|
else if (!File::Exists(dest)) File::Copy(source, dest);
|
||||||
|
Loading…
Reference in New Issue
Block a user