android icon indicating copy to clipboard operation
android copied to clipboard

Bug: Upload with option "move file to app folder" triggers file sync.

Open JonasMayerDev opened this issue 1 year ago • 0 comments

⚠️ Before posting ⚠️

  • [X] This is a bug, not a question or an enhancement.
  • [X] I've searched for similar issues and didn't find a duplicate.
  • [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • [X] I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Setup auto upload (or upload multiple files) with option "move file to app folder".
  2. Look at Notifications and uploads tab

Expected behaviour

Should not retrigger file sync for uploading a file but only when new file gets added or sync folder gets modified in other ways.

Actual behaviour

Retriggers file sync every time a file is uploaded, leading to notification "spamming", unnecessary load, "local file not found" conflicts and buggy uploads tab / upload list. Screen_recording_20240207_222351.webm

Android version

12

Device brand and model

Pixel 7

Stock or custom OS?

Stock

Nextcloud android app version

master

Nextcloud server version

27.1.3.2

Using a reverse proxy?

I don't know

Android logs

No response

Server error logs

No response

Additional information

Probably caused because ContentObserverWork listens for changes in the sync folder. When a file is uploaded it is moved in other folder thus triggering ContentObserverWork that then triggers file sync. Maybe before starting file sync worker check in upload list if changed file just got uploaded.

JonasMayerDev avatar Feb 07 '24 21:02 JonasMayerDev