diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-03-04 13:19:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-04 13:19:55 +0100 |
commit | f83f1d7c9b299f21f818e0ea28c27345f65bde4b (patch) | |
tree | 6142421a00cd01011e7bd433953f4800d381e3c6 /drivers/windows/dir_access_windows.cpp | |
parent | 2856740e6b238576273a321a125e9d92b687fdb2 (diff) | |
parent | aee586553a4be72b72b669fb489fae72337ab7ad (diff) | |
download | redot-engine-f83f1d7c9b299f21f818e0ea28c27345f65bde4b.tar.gz |
Merge pull request #36069 from RandomShaper/imvu/improve_drives_ux
Improve UX of drive letters
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) { |