diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-01 15:01:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-01 15:01:31 +0200 |
commit | d229507fa7adc54f7b99b25a8707b3fc445e518f (patch) | |
tree | fe5a25367c6343e80aa474b2e87b1c2fc2cee44f | |
parent | 96e654335a72c32c8ec2595d86360aeccb7eaaa1 (diff) | |
parent | 741f8d9bece1270cd6d0097671662280d708a970 (diff) |
Merge pull request #37486 from RandomShaper/fix_trimmed_res
Fix res:// trimmed to s:// on Windows
-rw-r--r-- | drivers/windows/dir_access_windows.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index cf09f79832..3df7eafe13 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -206,7 +206,13 @@ String DirAccessWindows::get_current_dir(bool p_include_drive) { if (p_include_drive) { return current_dir; } else { - return current_dir.right(current_dir.find(":") + 1); + if (_get_root_string() == "") { + int p = current_dir.find(":"); + if (p != -1) { + return current_dir.right(p + 1); + } + } + return current_dir; } } |