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

This commit is contained in:
Pedro J. Estébanez 2020-04-01 10:22:05 +02:00
parent e707b712e8
commit 21703aefee
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();
if (_get_root_string() == "") {
int p = current_dir.find(":");
return p != -1 ? dir.right(p + 1) : dir;
if (p != -1) {
dir = dir.right(p + 1);
}
}
return dir;
}
bool DirAccessWindows::file_exists(String p_file) {