projects
/
mikachu
/
openbox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
stat() can give an error, handle that
[mikachu/openbox.git]
/
obt
/
paths.c
diff --git
a/obt/paths.c
b/obt/paths.c
index
e2e4859
..
8afe4f7
100644
(file)
--- a/
obt/paths.c
+++ b/
obt/paths.c
@@
-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;