Small bugfix

This commit is contained in:
Mario Danic 2017-02-04 23:28:33 +01:00 committed by AndyScherzinger
parent 07981f0054
commit 1973705356
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -59,11 +59,7 @@ public class SyncedFolderObserverService extends Service {
fileFilter = new FileFilter() {
@Override
public boolean accept(File pathname) {
if (pathname.getName().startsWith(".")) {
return false;
}
return true;
return !pathname.getName().startsWith(".");
}
};
Log_OC.d(TAG, "start");
@ -74,16 +70,17 @@ public class SyncedFolderObserverService extends Service {
FileAlterationObserver observer = new FileAlterationObserver(syncedFolder.getLocalPath(), fileFilter);
observer.addListener(new FileAlterationMagicListener(syncedFolder));
monitor.addObserver(observer);
try {
monitor.start();
syncedFolderMap.put(syncedFolder.getLocalPath(), observer);
} catch (Exception e) {
Log_OC.d(TAG, "Something went very wrong at onStartCommand");
}
syncedFolderMap.put(syncedFolder.getLocalPath(), observer);
}
}
try {
monitor.start();
} catch (Exception e) {
Log_OC.d(TAG, "Something went very wrong at onStartCommand");
}
return Service.START_NOT_STICKY;
}