1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Revert "Fix Directory make_dir and make_dir_recursive"

This reverts commit 9b36357544.
This commit is contained in:
Nathan Franke
2020-07-19 23:53:19 -05:00
committed by Aaron Franke
parent ac2e7d87d1
commit 4c100a593f

View File

@@ -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);