diff options
| author | comex <comexk@gmail.com> | 2014-11-16 13:54:41 -0500 |
|---|---|---|
| committer | comex <comexk@gmail.com> | 2015-05-28 19:14:42 -0400 |
| commit | a0a80c9a9cc247024c012be474fb92d1c290d9b1 (patch) | |
| tree | fe04ab188f98bb7e4b179f2ad5d1397577262266 /Source/Core/Common/FileUtil.cpp | |
| parent | a225426510fc25316b3868e8764893dff284e77e (diff) | |
Fix CopyDir to not require source and dest paths to end with "/".
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
| -rw-r--r-- | Source/Core/Common/FileUtil.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 980821e010..19269e88d3 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -627,14 +627,11 @@ void CopyDir(const std::string &source_path, const std::string &dest_path) if (virtualName == "." || virtualName == "..") continue; - std::string source, dest; - source = source_path + virtualName; - dest = dest_path + virtualName; + std::string source = source_path + DIR_SEP + virtualName; + std::string dest = dest_path + DIR_SEP + virtualName; if (IsDirectory(source)) { - source += '/'; - dest += '/'; - if (!File::Exists(dest)) File::CreateFullPath(dest); + if (!File::Exists(dest)) File::CreateFullPath(dest + DIR_SEP); CopyDir(source, dest); } else if (!File::Exists(dest)) File::Copy(source, dest); |
