mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-28 06:12:53 -06:00
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:
parent
bad30d2f70
commit
f01899f18a
1 changed files with 9 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue