From d5dac66c7a7d20359df95a4948a2a2c0148a8dfb Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Wed, 20 Oct 2021 13:01:16 -0700 Subject: [PATCH] Path: Avoid adding a double slash from root. --- Common/File/Path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/File/Path.cpp b/Common/File/Path.cpp index 3a44c0c0f8..cbfc5f9099 100644 --- a/Common/File/Path.cpp +++ b/Common/File/Path.cpp @@ -87,7 +87,7 @@ Path Path::operator /(const std::string &subdir) const { return Path(path_); } std::string fullPath = path_; - if (subdir.front() != '/') { + if (subdir.front() != '/' && (fullPath.empty() || fullPath.back() != '/')) { fullPath += "/"; } fullPath += subdir;