diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-07-20 13:53:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-20 13:53:51 +0200 |
commit | 84fe3d7df592a35fb102ba71ea475fe03ee16ddc (patch) | |
tree | 3b3827626cfc61e44d336a96f3a33916d79e3f60 | |
parent | 474333e9a01ac6a14fefb44f02cd36c40d8bb51a (diff) | |
parent | 210ccb3a7552659e6ba1b69ed3c744d0af370eac (diff) |
Merge pull request #40528 from nathanfranke/fix-directory-make-dir
Fix Directory make_dir and make_dir_recursive
-rw-r--r-- | core/bind/core_bind.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 94da74cbda..2f8b11652b 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1690,7 +1690,7 @@ String _Directory::get_current_dir() { } Error _Directory::make_dir(String p_dir) { - ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use."); + ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory is not configured properly."); if (!p_dir.is_rel_path()) { DirAccess *d = DirAccess::create_for_path(p_dir); Error err = d->make_dir(p_dir); @@ -1701,7 +1701,7 @@ Error _Directory::make_dir(String p_dir) { } Error _Directory::make_dir_recursive(String p_dir) { - ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use."); + ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory is not configured properly."); if (!p_dir.is_rel_path()) { DirAccess *d = DirAccess::create_for_path(p_dir); Error err = d->make_dir_recursive(p_dir); |