diff options
Diffstat (limited to 'drivers/unix/dir_access_unix.cpp')
-rw-r--r-- | drivers/unix/dir_access_unix.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp index 1754b47c85..be993b88e5 100644 --- a/drivers/unix/dir_access_unix.cpp +++ b/drivers/unix/dir_access_unix.cpp @@ -342,7 +342,7 @@ Error DirAccessUnix::change_dir(String p_dir) { } String base = _get_root_path(); - if (base != String() && !try_dir.begins_with(base)) { + if (!base.is_empty() && !try_dir.begins_with(base)) { ERR_FAIL_COND_V(getcwd(real_current_dir_name, 2048) == nullptr, ERR_BUG); String new_dir; new_dir.parse_utf8(real_current_dir_name); @@ -360,7 +360,7 @@ Error DirAccessUnix::change_dir(String p_dir) { String DirAccessUnix::get_current_dir(bool p_include_drive) { String base = _get_root_path(); - if (base != "") { + if (!base.is_empty()) { String bd = current_dir.replace_first(base, ""); if (bd.begins_with("/")) { return _get_root_string() + bd.substr(1, bd.length()); |