String: plus_file(String) no longer adds a root
This commit is contained in:
parent
f392b340ff
commit
95396067b7
1 changed files with 3 additions and 2 deletions
|
@ -3822,8 +3822,9 @@ String String::extension() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
String String::plus_file(const String& p_file) const {
|
String String::plus_file(const String& p_file) const {
|
||||||
|
if (empty())
|
||||||
if (length()>0 && operator [](length()-1)=='/')
|
return p_file;
|
||||||
|
if (operator [](length()-1)=='/' || p_file.operator [](0)=='/')
|
||||||
return *this+p_file;
|
return *this+p_file;
|
||||||
else
|
else
|
||||||
return *this+"/"+p_file;
|
return *this+"/"+p_file;
|
||||||
|
|
Loading…
Reference in a new issue