From 633c0cf1b067d118d5453bc8522fab65ffc82d2c Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Tue, 15 Sep 2009 00:36:07 +0200 Subject: [PATCH] Use access() instead of stat() for checking whether scripts exist. --- src/process.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/process.c b/src/process.c index f03f12a..544c224 100644 --- a/src/process.c +++ b/src/process.c @@ -364,7 +364,6 @@ bool execute_script(const char *name, char **envp) { #ifdef HAVE_SYSTEM int status, len; - struct stat s; char *scriptname, *p; int i; @@ -383,7 +382,7 @@ bool execute_script(const char *name, char **envp) #ifndef HAVE_TUNEMU /* First check if there is a script */ - if(stat(scriptname + 1, &s)) { + if(access(scriptname + 1, F_OK)) { free(scriptname); return true; } -- 2.25.1