Merge pull request #37485 from RandomShaper/fix_trimmed_res_3.2

Fix res:// trimmed to s:// on Windows (3.2)
This commit is contained in:
Rémi Verschelde 2020-04-01 15:01:39 +02:00 committed by GitHub
commit 42a3a87e46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -209,8 +209,15 @@ String DirAccessWindows::get_current_dir() {
String DirAccessWindows::get_current_dir_without_drive() {
String dir = get_current_dir();
int p = current_dir.find(":");
return p != -1 ? dir.right(p + 1) : dir;
if (_get_root_string() == "") {
int p = current_dir.find(":");
if (p != -1) {
dir = dir.right(p + 1);
}
}
return dir;
}
bool DirAccessWindows::file_exists(String p_file) {