From e7b5284983869ab254c176f4f034a3bc37819d75 Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Tue, 13 Nov 2012 10:26:35 +0100 Subject: [PATCH] Remove observed file when requested although the list of observed had to be reinitialized --- src/com/owncloud/android/files/services/FileObserverService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) { -- 2.11.0