Make sure to monitor hidden folders

This commit is contained in:
Tad 2017-12-17 06:16:43 -05:00
parent e46b1723ef
commit 7b67a7c6f3
2 changed files with 4 additions and 4 deletions

View file

@ -6,8 +6,8 @@ android {
applicationId "us.spotco.malwarescanner"
minSdkVersion 21
targetSdkVersion 26
versionCode 13
versionName "1.6"
versionCode 15
versionName "1.7"
}
buildTypes {
debug {

View file

@ -11,8 +11,8 @@ import java.util.Stack;
* Copyright (C) 2012 Bartek Przybylski
* Copyright (C) 2015 ownCloud Inc.
* Copyright (C) 2016 Daniel Gultsch
* Taken from siacs/Conversations and tweaked a bit
*/
public abstract class RecursiveFileObserver {
private final String path;
@ -35,7 +35,7 @@ public abstract class RecursiveFileObserver {
continue;
}
for(File file : files) {
if (file.isDirectory() && file.getName().charAt(0) != '.') {
if (file.isDirectory() && !file.getName().equals(".") && !file.getName().equals("..")) {
final String currentPath = file.getAbsolutePath();
if (depth(file) <= 8 && !stack.contains(currentPath) && !observing(currentPath)) {
stack.push(currentPath);