summaryrefslogtreecommitdiff
path: root/drivers/windows
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2020-04-01 10:30:14 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2020-04-01 10:30:22 +0200
commit741f8d9bece1270cd6d0097671662280d708a970 (patch)
tree20a536d80ed94f9012357f5f88eff39f0dd36607 /drivers/windows
parentf7b8d0c688dc15b8841ac13990569dda81bf0652 (diff)
Fix res:// trimmed to s:// on Windows
Diffstat (limited to 'drivers/windows')
-rw-r--r--drivers/windows/dir_access_windows.cpp8
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;
}
}