Add descriptive error message when trying to access a dir fails

(cherry picked from commit edb8c11970)
This commit is contained in:
Carlos Cabello 2021-01-09 19:13:25 -06:00 committed by Rémi Verschelde
parent b2725cb4b9
commit d6c67d0521

View file

@ -181,8 +181,7 @@ Error DirAccess::make_dir_recursive(String p_dir) {
curpath = curpath.plus_file(subdirs[i]); curpath = curpath.plus_file(subdirs[i]);
Error err = make_dir(curpath); Error err = make_dir(curpath);
if (err != OK && err != ERR_ALREADY_EXISTS) { if (err != OK && err != ERR_ALREADY_EXISTS) {
ERR_FAIL_V_MSG(err, "Could not create directory: " + curpath);
ERR_FAIL_V(err);
} }
} }