diff options
Diffstat (limited to 'core/ustring.cpp')
-rw-r--r-- | core/ustring.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 6a1dc2295f..345db0eb13 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3792,7 +3792,8 @@ bool String::is_valid_float() const { String String::path_to_file(const String &p_path) const { - String src = this->replace("\\", "/").get_base_dir(); + // Don't get base dir for src, this is expected to be a dir already. + String src = this->replace("\\", "/"); String dst = p_path.replace("\\", "/").get_base_dir(); String rel = src.path_to(dst); if (rel == dst) // failed |