forked from enlightenment/efl
fix unchecked return value of stat in ecore_file_mv
stat() function may fail and return an error code This fixes CID 1039697
This commit is contained in:
parent
069a2b027f
commit
49511730d7
|
@ -591,7 +591,8 @@ ecore_file_mv(const char *src, const char *dst)
|
|||
|
||||
// Make sure this is a regular file before
|
||||
// we do anything fancy.
|
||||
stat(src, &st);
|
||||
if (stat(src, &st) == -1)
|
||||
goto FAIL;
|
||||
if (S_ISREG(st.st_mode))
|
||||
{
|
||||
char *dir;
|
||||
|
|
Loading…
Reference in New Issue