summaryrefslogtreecommitdiff
path: root/core/os/dir_access.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-03-13 12:17:53 +0100
committerGitHub <noreply@github.com>2018-03-13 12:17:53 +0100
commit18d543d7ab2a362e39cf45d7d4c44c188b60dac9 (patch)
treee6f40fb380c7498a5cf53147a113fac6e848b88d /core/os/dir_access.cpp
parent88c1430613f2bba5551b345ab07df23869af815e (diff)
parent0876502f7288a6d4e4bfb58f8692db3516bebb7c (diff)
Merge pull request #17311 from marcelofg55/export_err_checks
Improved error checking at EditorExportPlatformPC::export_project
Diffstat (limited to 'core/os/dir_access.cpp')
-rw-r--r--core/os/dir_access.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp
index 1941b82602..330a9153ef 100644
--- a/core/os/dir_access.cpp
+++ b/core/os/dir_access.cpp
@@ -301,8 +301,8 @@ Error DirAccess::copy(String p_from, String p_to, int p_chmod_flags) {
FileAccess *fsrc = FileAccess::open(p_from, FileAccess::READ, &err);
if (err) {
-
- ERR_FAIL_COND_V(err, err);
+ ERR_PRINTS("Failed to open " + p_from);
+ return err;
}
FileAccess *fdst = FileAccess::open(p_to, FileAccess::WRITE, &err);
@@ -310,7 +310,8 @@ Error DirAccess::copy(String p_from, String p_to, int p_chmod_flags) {
fsrc->close();
memdelete(fsrc);
- ERR_FAIL_COND_V(err, err);
+ ERR_PRINTS("Failed to open " + p_to);
+ return err;
}
fsrc->seek_end(0);