projects
/
mikachu
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3417809
)
stat() can give an error, handle that
author
Dana Jansens
<danakj@orodu.net>
Fri, 16 Apr 2010 15:41:13 +0000
(11:41 -0400)
committer
Mikael Magnusson
<mikachu@gmail.com>
Fri, 16 Apr 2010 18:56:24 +0000
(20:56 +0200)
obt/paths.c
patch
|
blob
|
history
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;