summaryrefslogtreecommitdiff
path: root/src/lib/ecore_file
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2014-08-08 11:09:56 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2014-08-08 11:28:57 +0200
commit40b395666ba8d58051881ca2121dedbae5a40ef3 (patch)
tree35ce0f02dc911ceb2a38499208bb7b5958643d48 /src/lib/ecore_file
parent80733c51716007dcf323b66a105499894135cd6c (diff)
downloadefl-40b395666ba8d58051881ca2121dedbae5a40ef3.tar.gz
ecore_file: Check return value of chmod()
Handle the error case here if chmod() fails. CID: 1039696
Diffstat (limited to 'src/lib/ecore_file')
-rw-r--r--src/lib/ecore_file/ecore_file.c2
1 files changed, 1 insertions, 1 deletions
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))