stat() can give an error, handle that
This commit is contained in:
parent
34178097d5
commit
3afa20de54
1 changed files with 2 additions and 1 deletions
|
@ -331,7 +331,8 @@ static inline gboolean try_exec(const ObtPaths *const p,
|
|||
struct stat st;
|
||||
BSEARCH_SETUP(guint);
|
||||
|
||||
stat(path, &st);
|
||||
if (stat(path, &st) != 0)
|
||||
return FALSE;
|
||||
|
||||
if (!S_ISREG(st.st_mode))
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue