From: David A. Velasco Date: Tue, 13 Nov 2012 09:26:35 +0000 (+0100) Subject: Remove observed file when requested although the list of observed had to be reinitialized X-Git-Tag: oc-android-1.4.3~111 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/e7b5284983869ab254c176f4f034a3bc37819d75 Remove observed file when requested although the list of observed had to be reinitialized --- diff --git a/src/com/owncloud/android/files/services/FileObserverService.java b/src/com/owncloud/android/files/services/FileObserverService.java index 2cae6f2d..4cb16de1 100644 --- a/src/com/owncloud/android/files/services/FileObserverService.java +++ b/src/com/owncloud/android/files/services/FileObserverService.java @@ -181,17 +181,16 @@ public class FileObserverService extends Service implements FileObserverStatusLi if (path == null) return; if (mObservers == null) { initializeObservedList(); - return; // ISSUE 2: why return? ; the file still has to be removed of the mObservers ! } for (int i = 0; i < mObservers.size(); ++i) { OwnCloudFileObserver observer = mObservers.get(i); if (observer.getPath().equals(path)) { observer.stopWatching(); mObservers.remove(i); + Log.d(TAG, "Stopped watching " + path); break; } } - Log.d(TAG, "Stopped watching " + path); } private void addDownloadingFile(String remotePath) {