diff --git a/ChangeLog b/ChangeLog index a0debf82fcafb7a90fb64fafc476771d5fa8e3eb..b69e77af36b9fac0cb4d7845148b68cdc18ad913 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ svn - ? - Fixed incorrect apparent size on directory refresh - Browsing keys now work while file info window is displayed + - Current directory is assumed when no directory is specified 1.4 - 2008-09-10 - Removed the startup window diff --git a/src/main.c b/src/main.c index af9b5c1fa49ada98d0ae955afe7d592cca58119d..6928e02a27c4ce508836eaf75c3af1216602d490 100644 --- a/src/main.c +++ b/src/main.c @@ -43,7 +43,6 @@ void parseCli(int argc, char **argv) { sflags = 0; sdelay = 100; bflags = BF_SIZE | BF_DESC; - sdir[0] = '\0'; /* read from commandline */ for(i=1; i<argc; i++) { @@ -88,14 +87,12 @@ void parseCli(int argc, char **argv) { } else { sdir[PATH_MAX - 1] = 0; strncpy(sdir, argv[i], PATH_MAX); - if(sdir[PATH_MAX - 1] != 0) - sdir[0] = 0; + if(sdir[PATH_MAX - 1] != 0) { + printf("Error: path length exceeds PATH_MAX\n"); + exit(1); + } } } - if(!sdir[0]) { - printf("Please specify a directory.\nSee '%s -h' for more information.\n", argv[0]); - exit(1); - } }