From df6dbadc3efa3c0f36b6c3c8992dba153e303254 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 8 Aug 2016 18:20:16 -0300 Subject: [PATCH] Fixed bug in make_dir_recursive, closes #6016 --- core/bind/core_bind.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 3e2f8ff2638..4e815d044dd 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1936,6 +1936,13 @@ Error _Directory::make_dir(String p_dir){ Error _Directory::make_dir_recursive(String p_dir){ ERR_FAIL_COND_V(!d,ERR_UNCONFIGURED); + if (!p_dir.is_rel_path()) { + DirAccess *d = DirAccess::create_for_path(p_dir); + Error err = d->make_dir_recursive(p_dir); + memdelete(d); + return err; + + } return d->make_dir_recursive(p_dir); }