nextcloud / nextcloud/android

data loss if I move a file before it is synchronized after using "Open With"

Open
#8,323 7 comments 0 reactions 0 assignees View on GitHub
approved bug feature: sync
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### Steps to reproduce
1. on nextcloud web, create a directory (dir), a subdirectory (dir/subdir), and a file in the subdirectory (dir/subdir/testfile.txt)
2. synchronize that directory with android (so directory, subdirectory, and file are synced) and appear in «On the device» list
3. go to «On the device» list (I don't know the exact name, in French it's «Sur l'appareil» in the menu)
4. from there, modify the file in place with another application (for example with Material File for a text file, Xodo PDF for a pdf,...), save it, and quit the application
5. back in nextcloud-android, move the subdirectory to another directory (synced or not)
6. if the file (or the subdir) has not been synced before the move (which is most of the times), you have lost the modification

### Expected behaviour
- the directory should be synced before it is moved, so that the latest version of the file is moved.

### Actual behaviour
- I lost data. Happens with any application that modifies the files in place (Material File, Xodo pdf editor,...) from the android client because it does not sync the directory before the move

This is made more severe by the fact that simply swiping down the view DOES NOT SYNC, but simply refreshes the content from the server if needed. (I'll open another bug report for that)
### Can you reproduce this problem on https://try.nextcloud.com?
yep

### Environment data
Android version: android 10 (LineageOS 17.1, Samsung Stock)

Device model: oneplus3, Samsung TAB S6 Lite and S7

Stock or customized system: LOS 17.1 without google services, or stock Samsung

Nextcloud app version: 3.15.1

Nextcloud server version: 20.0.7, 21.0.1, try.nextcloud.com

Reverse proxy: haproxy and apache

### Logs
I don't think they are relevant, ask if really needed

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.