diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/ustring.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 9fb8cfc00f..66608379be 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3894,8 +3894,9 @@ String String::get_extension() const { } String String::plus_file(const String& p_file) const { - - if (length()>0 && operator [](length()-1)=='/') + if (empty()) + return p_file; + if (operator [](length()-1)=='/' || p_file.operator [](0)=='/') return *this+p_file; else return *this+"/"+p_file; |