nextcloud / nextcloud/android

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

Open
#12,520 0 comments 0 reactions 0 assignees View on GitHub
bug feature: auto upload stable-3.28
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### ⚠️ Before posting ⚠️

- [X] This is a **bug**, not a question or an enhancement.
- [X] I've [searched for similar issues](https://github.com/nextcloud/android/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](https://nextcloud.com/contribute/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](https://github.com/nextcloud/android/assets/43114340/7da383b3-6149-4042-8829-a4801835162d)

### 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.