diff options
author | Leah Neukirchen <leah@vuxu.org> | 2020-08-04 22:47:36 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-08-04 22:47:36 +0200 |
commit | c3f0e7052453fed04a696535145d40dfd2a3b6a3 (patch) | |
tree | 96d89673da625d9bd738a940a82abf602b111f84 | |
parent | e6b1dceda0ab7958b7e989e4dbb5d8353bcc8d26 (diff) | |
download | lr-c3f0e7052453fed04a696535145d40dfd2a3b6a3.tar.gz lr-c3f0e7052453fed04a696535145d40dfd2a3b6a3.tar.xz lr-c3f0e7052453fed04a696535145d40dfd2a3b6a3.zip |
count_entries: fix when fi->fpath is "" (at toplevel)
Reported by @Profpatsch.
-rw-r--r-- | lr.c | 2 |
1 files changed, 1 insertions, 1 deletions
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))) { |