From a946529236e8e5c16cab5a1ab87d55bf8e5b03fa Mon Sep 17 00:00:00 2001 From: R2DLiu Date: Tue, 30 Jun 2020 23:06:09 -0400 Subject: [PATCH] Add legacy function removed from mainline --- Source/Core/Common/FileUtil.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index c2a2151893..464fd5b7e3 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -533,6 +533,15 @@ bool DeleteDirRecursively(const std::string& directory) return success; } +static void StripTailDirSlashes(std::string& fname) +{ + if (fname.length() > 1) + { + while (fname.back() == DIR_SEP_CHR) + fname.pop_back(); + } +} + // SLIPPITODO: replace with C++17 https://en.cppreference.com/w/cpp/filesystem/last_write_time u64 GetFileModTime(const std::string& filename) {