diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-14 09:16:41 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-14 09:17:15 -0300 |
commit | da4170540cbe3dcec4855ddbb59edf1abd7cf9b4 (patch) | |
tree | 873e57d1fdbf5cfe414c9610068e78ce0d4258db /drivers/unix | |
parent | 7b9f2d9929d0e8516d42379962533df823c7c550 (diff) |
Fixed dir access return value, changed it to Error like all other funcs
Diffstat (limited to 'drivers/unix')
-rw-r--r-- | drivers/unix/dir_access_unix.cpp | 6 | ||||
-rw-r--r-- | drivers/unix/dir_access_unix.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp index 3bb30700db..890b6b17bc 100644 --- a/drivers/unix/dir_access_unix.cpp +++ b/drivers/unix/dir_access_unix.cpp @@ -44,7 +44,7 @@ DirAccess *DirAccessUnix::create_fs() { return memnew( DirAccessUnix ); } -bool DirAccessUnix::list_dir_begin() { +Error DirAccessUnix::list_dir_begin() { list_dir_end(); //close any previous dir opening! @@ -55,9 +55,9 @@ bool DirAccessUnix::list_dir_begin() { dir_stream = opendir(current_dir.utf8().get_data()); //chdir(real_current_dir_name); if (!dir_stream) - return true; //error! + return ERR_CANT_OPEN; //error! - return false; + return OK; } bool DirAccessUnix::file_exists(String p_file) { diff --git a/drivers/unix/dir_access_unix.h b/drivers/unix/dir_access_unix.h index 324d2a379c..f075c48268 100644 --- a/drivers/unix/dir_access_unix.h +++ b/drivers/unix/dir_access_unix.h @@ -57,7 +57,7 @@ protected: public: - virtual bool list_dir_begin(); ///< This starts dir listing + virtual Error list_dir_begin(); ///< This starts dir listing virtual String get_next(); virtual bool current_is_dir() const; virtual bool current_is_hidden() const; |