do not run file observer on hidden directories

This commit is contained in:
Daniel Gultsch 2017-08-05 19:12:44 +02:00
parent 911e392006
commit 490115d20e

View File

@ -36,7 +36,7 @@ public abstract class ConversationsFileObserver {
continue;
}
for(File file : files) {
if (file.isDirectory() && !file.getName().equals(".") && !file.getName().equals("..")) {
if (file.isDirectory() && file.getName().charAt(0) != '.') {
final String currentPath = file.getAbsolutePath();
if (depth(file) <= 8 && !stack.contains(currentPath) && !observing(currentPath)) {
stack.push(currentPath);