From c115127e1c2a0a371c7c936d653467ffed1c4441 Mon Sep 17 00:00:00 2001 From: Tigran Aivazian Date: Mon, 8 Oct 2012 12:04:52 +0100 Subject: [PATCH] Bugfix: count books like BOOK.PDF and BOOK.DJVU In the function FileInfo:getFolderContent() we need to lowercase the extension before deciding if it is a book or not --- otherwise files like BOOK.PDF and BOOK.DJVU are not counted as books. --- fileinfo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fileinfo.lua b/fileinfo.lua index 46a0dd515..d0568e6b1 100644 --- a/fileinfo.lua +++ b/fileinfo.lua @@ -74,7 +74,7 @@ function FileInfo:getFolderContent() if j == "file" then files = files + 1 ftype = string.match(name, ".+%.([^.]+)") - if ftype and ext:getReader(ftype) then + if ftype and ext:getReader(string.lower(ftype)) then books = books + 1 end elseif j == "directory" then