diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c index c41039379f..9a3c6d021e 100644 --- a/src/lib/ecore_file/ecore_file.c +++ b/src/lib/ecore_file/ecore_file.c @@ -613,7 +613,7 @@ ecore_file_mv(const char *src, const char *dst) goto FAIL; // Set file permissions of temp file to match src - chmod(buf, st.st_mode); + if (chmod(buf, st.st_mode) == -1) goto FAIL; // Try to atomically move temp file to dst if (rename(buf, dst))