From c3f0e7052453fed04a696535145d40dfd2a3b6a3 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 4 Aug 2020 22:47:36 +0200 Subject: count_entries: fix when fi->fpath is "" (at toplevel) Reported by @Profpatsch. --- lr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lr.c') diff --git a/lr.c b/lr.c index dd485c2..276abec 100644 --- a/lr.c +++ b/lr.c @@ -1250,7 +1250,7 @@ count_entries(struct fileinfo *fi) if (!S_ISDIR(fi->sb.st_mode)) return 0; - d = opendir(fi->fpath); + d = opendir(fi->fpath[0] ? fi->fpath : "."); if (!d) return 0; while ((de = readdir(d))) { -- cgit 1.4.1