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

Offen
#17,589 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
68/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
android, kotlin
Bereich
mobile-dev

Rechercherichtung

Beginne in ConflictsResolveActivity und verfolge showOfflineOperationConflictDialog() durch den Offline-Upload-Worker. Achte dabei auf die Wahl zwischen Decision.KEEP_BOTH_FOLDER und KEEP_BOTH. Reproduziere den Offline-Konfliktablauf und überprüfe anschließend, dass die Auswahl von „beide behalten“ die Remote-Datei beibehält und eine umbenannte hochgeladene Datei erstellt, entsprechend dem Online-Verhalten.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
Kotlin
Sterne
5.7k
Forks
2.1k
Ø Merge
1 T. 22 Std.
Gemergte PRs (30 T.)
135

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus nextcloud/android

Alle Issues in nextcloud/android

Ähnliche Issues

Weitere Issues zu Kotlin

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.