diff options
Diffstat (limited to 'core/os/dir_access.cpp')
-rw-r--r-- | core/os/dir_access.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index d81c30f33a..9feca5c673 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -373,12 +373,12 @@ Error DirAccess::_copy_dir(DirAccess *p_target_da, String p_to, int p_chmod_flag if (current_is_dir()) dirs.push_back(n); else { - String rel_path = n; + const String &rel_path = n; if (!n.is_rel_path()) { list_dir_end(); return ERR_BUG; } - Error err = copy(get_current_dir() + "/" + n, p_to + rel_path, p_chmod_flags); + Error err = copy(get_current_dir().plus_file(n), p_to + rel_path, p_chmod_flags); if (err) { list_dir_end(); return err; |