mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Small bugfix
This commit is contained in:
parent
07981f0054
commit
1973705356
1 changed files with 9 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue