From 080bd22d77bf50b3e9d8e06600abb88dbe7b7dbe Mon Sep 17 00:00:00 2001 From: Andrey Prygunkov Date: Sun, 17 Jan 2016 12:58:43 +0100 Subject: [PATCH] #141: ignore hidden files and directories in NzbDir The files and directories whose names start with dot are now ignored by the scanner of incoming nzb directory. --- daemon/queue/Scanner.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/daemon/queue/Scanner.cpp b/daemon/queue/Scanner.cpp index 05747d39..c6b53529 100644 --- a/daemon/queue/Scanner.cpp +++ b/daemon/queue/Scanner.cpp @@ -155,6 +155,12 @@ void Scanner::CheckIncomingNzbs(const char* directory, const char* category, boo DirBrowser dir(directory); while (const char* filename = dir.Next()) { + if (filename[0] == '.') + { + // skip hidden files + continue; + } + BString<1024> fullfilename("%s%s", directory, filename); bool isDirectory = FileSystem::DirectoryExists(fullfilename); // check subfolders