aboutsummaryrefslogtreecommitdiff
path: root/lsx.c
diff options
context:
space:
mode:
authorConnor Lane Smith <cls@lubutu.com>2011-06-18 07:50:46 +0100
committerConnor Lane Smith <cls@lubutu.com>2011-06-18 07:50:46 +0100
commit86e9e6f1ecc4711d8fe447f5c0f2c1bd0feb8568 (patch)
tree78004216c78d80f867713a8afd10ff0797fb62f4 /lsx.c
parenteadf090413c530e69e8568492ebeb4b4087bd2ad (diff)
downloaddmenu-86e9e6f1ecc4711d8fe447f5c0f2c1bd0feb8568.tar.gz
dmenu-86e9e6f1ecc4711d8fe447f5c0f2c1bd0feb8568.tar.bz2
dmenu-86e9e6f1ecc4711d8fe447f5c0f2c1bd0feb8568.zip
simpler lsx
Diffstat (limited to 'lsx.c')
-rw-r--r--lsx.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lsx.c b/lsx.c
index 325c508..fd28625 100644
--- a/lsx.c
+++ b/lsx.c
@@ -14,8 +14,6 @@ main(int argc, char *argv[]) {
if(argc < 2)
lsx(".");
- else if(!strcmp(argv[1], "-v"))
- puts("lsx-0.2, © 2006-2011 dmenu engineers, see LICENSE for details");
else for(i = 1; i < argc; i++)
lsx(argv[i]);
return EXIT_SUCCESS;
@@ -34,7 +32,7 @@ lsx(const char *dir) {
}
while((d = readdir(dp))) {
snprintf(buf, sizeof buf, "%s/%s", dir, d->d_name);
- if(stat(buf, &st) == 0 && S_ISREG(st.st_mode) && access(buf, X_OK) == 0)
+ if(!stat(buf, &st) && S_ISREG(st.st_mode) && access(buf, X_OK) == 0)
puts(d->d_name);
}
closedir(dp);