From 30449be1fdf69727b1c50e9a83194371a45e3dc5 Mon Sep 17 00:00:00 2001 From: fredrik Date: Mon, 3 Jul 2006 02:13:12 +0000 Subject: [PATCH] Select . by default instead of erroring out. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/utils@665 959494ce-11ee-0310-bf91-de5d638817bd --- bkselect.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bkselect.c b/bkselect.c index 3847879..736a575 100644 --- a/bkselect.c +++ b/bkselect.c @@ -84,7 +84,7 @@ int bkselect(char *path, int s) void usage(void) { - fprintf(stderr, "usage: bkselect [-hsqo] path...\n"); + fprintf(stderr, "usage: bkselect [-hsqo] [path...]\n"); } int main(int argc, char **argv) @@ -110,13 +110,13 @@ int main(int argc, char **argv) } } if(argc - optind < 1) { - usage(); - exit(1); - } - r = 0; - for(i = optind; i < argc; i++) { - if(bkselect(argv[i], s)) - r = 1; + r = bkselect(".", s); + } else { + r = 0; + for(i = optind; i < argc; i++) { + if(bkselect(argv[i], s)) + r = 1; + } } if(printsize) printf("%lli\n", tsize); -- 2.11.0