diff options
Diffstat (limited to 'drivers/windows/dir_access_windows.cpp')
-rw-r--r-- | drivers/windows/dir_access_windows.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index 8e0eac6986..cf09f79832 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -189,7 +189,7 @@ Error DirAccessWindows::make_dir(String p_dir) { return ERR_CANT_CREATE; } -String DirAccessWindows::get_current_dir() { +String DirAccessWindows::get_current_dir(bool p_include_drive) { String base = _get_root_path(); if (base != "") { @@ -203,7 +203,11 @@ String DirAccessWindows::get_current_dir() { } else { } - return current_dir; + if (p_include_drive) { + return current_dir; + } else { + return current_dir.right(current_dir.find(":") + 1); + } } bool DirAccessWindows::file_exists(String p_file) { |