From 4c100a593fb0f134b41ea66f9906c15799cf2917 Mon Sep 17 00:00:00 2001 From: Nathan Franke Date: Sun, 19 Jul 2020 23:53:19 -0500 Subject: [PATCH] Revert "Fix Directory make_dir and make_dir_recursive" This reverts commit 9b36357544851afe5648220fd0a9a8e0197960a9. --- core/bind/core_bind.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index f07c2a4830e..c92827c2ea3 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -2436,7 +2436,7 @@ String _Directory::get_current_dir() { return d->get_current_dir(); } Error _Directory::make_dir(String p_dir) { - ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory is not configured properly."); + ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use."); if (!p_dir.is_rel_path()) { DirAccess *d = DirAccess::create_for_path(p_dir); Error err = d->make_dir(p_dir); @@ -2446,7 +2446,7 @@ Error _Directory::make_dir(String p_dir) { return d->make_dir(p_dir); } Error _Directory::make_dir_recursive(String p_dir) { - ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory is not configured properly."); + ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use."); if (!p_dir.is_rel_path()) { DirAccess *d = DirAccess::create_for_path(p_dir); Error err = d->make_dir_recursive(p_dir);