summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-08-08 18:20:16 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-08-08 18:21:06 -0300
commitdf6dbadc3efa3c0f36b6c3c8992dba153e303254 (patch)
tree284ec5163cbb2b6541c25260ec8a86ecdace50b3 /core
parent5d9967ef0071b8ecc36db45640cb3eb66adb5f14 (diff)
Fixed bug in make_dir_recursive, closes #6016
Diffstat (limited to 'core')
-rw-r--r--core/bind/core_bind.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 3e2f8ff263..4e815d044d 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);
}