From 08575f65f1c907e280ed4663b5461b7cfaf5cfaa Mon Sep 17 00:00:00 2001 From: Grant Paul Date: Sun, 17 Jul 2016 23:10:46 -0700 Subject: [PATCH] Fix extra separator added when project has no specific directory. Normalizing a path doesn't remove trailing directory separators, so all paths relative to the working directory gained an extra separator when the working directory itself ended in a separator. --- Libraries/pbxproj/Sources/PBX/Project.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Libraries/pbxproj/Sources/PBX/Project.cpp b/Libraries/pbxproj/Sources/PBX/Project.cpp index de27b5f84..9b154e5cf 100644 --- a/Libraries/pbxproj/Sources/PBX/Project.cpp +++ b/Libraries/pbxproj/Sources/PBX/Project.cpp @@ -52,7 +52,11 @@ settings(void) const std::string Project:: sourceRoot() const { - return FSUtil::NormalizePath(_basePath + "/" + _projectDirPath); + std::string root = _basePath; + if (!_projectDirPath.empty()) { + root += "/" + _projectDirPath; + } + return FSUtil::NormalizePath(root); } bool Project::