Merge pull request #22630 from dualtagh/22478

22478: Can't duplicate folder with another folder inside
This commit is contained in:
Rémi Verschelde 2018-12-07 23:12:06 +01:00 committed by GitHub
commit fa91944c06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -431,8 +431,12 @@ Error DirAccess::copy_dir(String p_from, String p_to, int p_chmod_flags) {
ERR_FAIL_COND_V(err, err);
}
if (!p_to.ends_with("/")) {
p_to = p_to + "/";
}
DirChanger dir_changer(this, p_from);
Error err = _copy_dir(target_da, p_to + "/", p_chmod_flags);
Error err = _copy_dir(target_da, p_to, p_chmod_flags);
memdelete(target_da);
return err;