forked from enlightenment/efl
ecore_file: Check return value of chmod()
Handle the error case here if chmod() fails. CID: 1039696
This commit is contained in:
parent
80733c5171
commit
40b395666b
|
@ -613,7 +613,7 @@ ecore_file_mv(const char *src, const char *dst)
|
||||||
goto FAIL;
|
goto FAIL;
|
||||||
|
|
||||||
// Set file permissions of temp file to match src
|
// 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
|
// Try to atomically move temp file to dst
|
||||||
if (rename(buf, dst))
|
if (rename(buf, dst))
|
||||||
|
|
Loading…
Reference in New Issue