Ver Fonte

Fix res:// trimmed to s:// on Windows

Pedro J. Estébanez há 5 anos atrás
pai
commit
741f8d9bec
1 ficheiros alterados com 7 adições e 1 exclusões
  1. 7 1
      drivers/windows/dir_access_windows.cpp

+ 7 - 1
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;
 	}
 }