From 86dc6860f9def64ad554a7c69eeae28203661e2c Mon Sep 17 00:00:00 2001 From: Paride Legovini Date: Wed, 28 Sep 2016 18:59:15 +0200 Subject: Allow opening directories non-recursively --- main.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 5b41170..d1813a5 100644 --- a/main.c +++ b/main.c @@ -818,11 +818,7 @@ int main(int argc, char **argv) if (!S_ISDIR(fstats.st_mode)) { check_add_file(filename, true); } else { - if (!options->recursive) { - error(0, 0, "%s: Is a directory", filename); - continue; - } - if (r_opendir(&dir, filename) < 0) { + if (r_opendir(&dir, filename, options->recursive) < 0) { error(0, errno, "%s", filename); continue; } -- cgit v1.2.3-54-g00ecf