Android: Auto Upload doesn't forget old directories

Created on 3 Feb 2019  路  7Comments  路  Source: nextcloud/android

Actual behaviour

when directories found once by Auto Upload disappear, they are not removed from the list of available media directories _and_ they show "phantom" content from other directories.

Expected behaviour

Non-existing directories should disappear from the list.

Steps to reproduce

  1. create a new directory with photos
  2. wait until Auto Upload has discovered it (e.g. restart Android or wait a long time)
  3. remove the directory

Environment data

Android version: 8.1 (LineageOS)

Device model: bq Aquaris Pro X

Stock or customized system: LineageOS

Nextcloud app version: 3.4.2 (FDroid)

Nextcloud server version: 15.0.0

Logs

Web server error log

n/a

Nextcloud log (data/nextcloud.log)

n/a (I think, let me know if you need it)

approved bug pr exists

All 7 comments

GitMate.io thinks possibly related issues are https://github.com/nextcloud/android/issues/1175 (Autoupload does not create directories), https://github.com/nextcloud/android/issues/2249 (Auto Upload does not work.), https://github.com/nextcloud/android/issues/1832 (Auto Upload does not work), https://github.com/nextcloud/android/issues/2979 (Auto Upload does not work), and https://github.com/nextcloud/android/issues/2834 (Auto upload doesn't work).

@tobiasKaminsky this is due to the fact that the media scan notification implementation creates a auto upload db entry and the auto upload screen doesn't check and delete entries where the local folder doesn't exist anymore. Imho the notification list and auto upload should be separated.

Hm. I had folder "123" in autoupload, removed it and restarted the device, now I do not see "123" folder anymore.

@tobiasKaminsky did you ever see a notification for "123" ?

No notification as it was like the folder already exists before installing the app

ah, that is the wrong test case.

  • Create a new folder _after_ you installed the app and add some media.
  • swipe away the notification
  • remove the folder from the file system
  • open the auto upload screen within the app

It should now show the folder (since wew have a DB entry) while the folder doesn't exist on the filesystem anymore...

So this seems only to happen if you delete the folder without Android is knowing it (if no MediaScanner is triggered).
After force-refreshing MediaScanner or restart the device, the folder is not shown anymore.
But I'll create a PR to fix this on our site.

Was this page helpful?
0 / 5 - 0 ratings