Ignore hidden files (starting with .) while scanning library files
This commit is contained in:
committed by
Aditya Chandel
parent
8439d31d1a
commit
dcd993af4f
+3
@@ -292,6 +292,9 @@ public class LibraryProcessingService {
|
|||||||
stream.filter(Files::isRegularFile)
|
stream.filter(Files::isRegularFile)
|
||||||
.filter(file -> {
|
.filter(file -> {
|
||||||
String fileName = file.getFileName().toString().toLowerCase();
|
String fileName = file.getFileName().toString().toLowerCase();
|
||||||
|
if (fileName.startsWith(".")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return fileName.endsWith(".pdf") ||
|
return fileName.endsWith(".pdf") ||
|
||||||
fileName.endsWith(".epub") ||
|
fileName.endsWith(".epub") ||
|
||||||
fileName.endsWith(".cbz") ||
|
fileName.endsWith(".cbz") ||
|
||||||
|
|||||||
Reference in New Issue
Block a user