ide/Builders: Quoting path now removes trailing '/', '\\'

git-svn-id: svn://ultimatepp.org/upp/trunk@7725 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-09-25 06:45:25 +00:00
parent bad30d2f70
commit f01899f18a

View file

@ -106,14 +106,21 @@ String CppBuilder::GetHostPathShort(const String& path) const
return path;
}
String TrimSlash(String s)
{
while(findarg(*s.Last(), '/', '\\') >= 0)
s.Trim(s.GetCount() - 1);
return s;
}
String CppBuilder::GetHostPathQ(const String& path) const
{
return '\"' + GetHostPath(path) + '\"';
return '\"' + TrimSlash(GetHostPath(path)) + '\"';
}
String CppBuilder::GetHostPathShortQ(const String& path) const
{
return '\"' + GetHostPathShort(path) + '\"';
return '\"' + TrimSlash(GetHostPathShort(path)) + '\"';
}
String CppBuilder::GetLocalPath(const String& path) const