Offline upload conflicts resolution overwrites the remote file even if the user select to keep both

Aperta
#17,589 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
android, kotlin
Ambito
mobile-dev

Direzione di ricerca

Inizia in ConflictsResolveActivity e segui showOfflineOperationConflictDialog() attraverso il worker di upload offline, prestando attenzione alla scelta tra Decision.KEEP_BOTH_FOLDER e KEEP_BOTH. Riproduci il flusso del conflitto offline, quindi verifica che scegliere di mantenere entrambi lasci il file remoto e crei un file caricato con un nuovo nome, come nel comportamento online.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

approved bug
⚠️ Before posting ⚠️
  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.
Steps to reproduce
  1. Create a folder
  2. Upload a file (e.g. a text file)
  3. Go offline (e.g. airplane mode)
  4. Change the file (e.g. add some characters)
  5. Upload a second time the file
  6. Go online
  7. A conflict message is shown
  8. Choose to keep BOTH files
  9. The online file is overwritten by the new uploaded file (only one file present in the folder at the end)
Expected behaviour

The folder should contain two files: the remote one and the newly uploaded, renamed (as it happens if following the same steps without ever going offline).

Actual behaviour

The online file is overwritten by the new uploaded file (only one file present in the folder at the end)

Android version

17

Device brand and model

Emulator on Android Studio

Stock or custom OS?

Stock

Nextcloud android app version

35.0.0 RC1

Nextcloud server version

Nextcloud Hub 26 Spring (36.0.0 dev)

Using a reverse proxy?

No

Android logs

No response

Server error logs

Additional information

I think it's related to ConflictsResolveActivity having its own flow for offline uploads (see showOfflineOperationConflictDialog()) and passing Decision.KEEP_BOTH_FOLDER instead of KEEP_BOTH to the worker

Lingua principale
Kotlin
Stelle
5.7k
Fork
2.1k
Merge medio
1g 22h
PR unite (30g)
135

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nextcloud/android

Tutte le issue di nextcloud/android

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.