From 490115d20e42770b33ae422dd64620296ab2a955 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 5 Aug 2017 19:12:44 +0200 Subject: [PATCH] do not run file observer on hidden directories --- .../eu/siacs/conversations/utils/ConversationsFileObserver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/utils/ConversationsFileObserver.java b/src/main/java/eu/siacs/conversations/utils/ConversationsFileObserver.java index ab4dead8b..3e0cfd2a4 100644 --- a/src/main/java/eu/siacs/conversations/utils/ConversationsFileObserver.java +++ b/src/main/java/eu/siacs/conversations/utils/ConversationsFileObserver.java @@ -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);