From 675f1170266f7659530c495fbbe1f1cc6445b405 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 16 Aug 2010 19:38:17 -0400 Subject: [PATCH] [wmiir] Use stat rater than lstat for proglist. Fixes issue #215. --- cmd/wmiir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/wmiir.c b/cmd/wmiir.c index 4608ca50..f727aabe 100644 --- a/cmd/wmiir.c +++ b/cmd/wmiir.c @@ -434,7 +434,7 @@ static int xproglist(int argc, char *argv[]) { DIR *d; struct dirent *de; - struct stat stat; + struct stat st; char *dir, *cwd; int i; @@ -454,8 +454,8 @@ xproglist(int argc, char *argv[]) { /* Don't use Blprint. wimenu expects UTF-8. */ if(!chdir(cwd) && !chdir(dir) && (d = opendir(dir))) { while((de = readdir(d))) { - lstat(de->d_name, &stat); - if(S_ISREG(stat.st_mode) && !access(de->d_name, X_OK)) + stat(de->d_name, &st); + if(S_ISREG(st.st_mode) && !access(de->d_name, X_OK)) Bprint(outbuf, "%q\n", de->d_name); } closedir(d);