Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Commit

Permalink
Fix extra separator added when project has no specific directory.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
grp committed Jul 22, 2016
1 parent f7dc274 commit 08575f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Libraries/pbxproj/Sources/PBX/Project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down

0 comments on commit 08575f6

Please sign in to comment.