aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Koutenský <koutak.m@gmail.com>2015-11-12 20:58:33 +0100
committerMichal Koutenský <koutak.m@gmail.com>2015-11-12 20:58:33 +0100
commit68668c3d740fb8ddf42661c75c06cc7123dba114 (patch)
tree7614110685b58fcc4311187ad5656387eb324178 /src
parent82e684b8103172cf41a88b01800147fe88f2c33d (diff)
downloadimv-68668c3d740fb8ddf42661c75c06cc7123dba114.tar.gz
position independend -
Diffstat (limited to 'src')
-rw-r--r--src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index f0c3a9f..b4ac73d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -104,10 +104,6 @@ void parse_args(int argc, char** argv)
exit(1);
}
}
-
- if(optind<argc && !strcmp("-",argv[optind])){
- g_options.stdin = 1;
- }
}
int main(int argc, char** argv)
@@ -123,6 +119,10 @@ int main(int argc, char** argv)
parse_args(argc,argv);
for(int i = optind; i < argc; ++i) {
+ if(!strcmp("-",argv[i])) {
+ g_options.stdin = 1;
+ continue;
+ }
if(g_options.recursive) {
imv_navigator_add_path_recursive(&nav, argv[i]);
} else {