Skip to content

[Bug]: Possible race condition when populating upload conflict dialog on stable27 #45661

Closed

Description

@mejo-

⚠️ This issue respects the following points: ⚠️

Bug description

When uploading a folder that already exists, the frontend code iterates through all files to be uploaded and adds those that already exist to the conflict dialog. This can result in not all affected files being listed due to a race condition.

The problem is the following: The first time addConflict() is called, the dialog is created. This happens asynchronously, but this._fileexistsshown = true is set synchronously. So subsequent addConflict() calls might already add conflicts without the object being created. Basically this._fileexistsshown can be truthy before the dialog is created.

In another scenario a similar problem got fixed with commit 5dff9d8, but this was slightly easier because the loop over affected files was more accessible.

Steps to reproduce

  1. Upload a folder with subfolders and files
  2. Again upload the same folder
  3. In some occasions, the conflict dialog only lists a subset of the files that should get overwritten

Expected behavior

Conflict dialog should list all files that get overwritten.

Nextcloud Server version

27

Activity

  1. added this to the Nextcloud 27.1.11 milestone on Jun 4, 2024
  2. self-assigned this
    on Jun 4, 2024
  3. added a commit that references this issue on Jun 4, 2024
    d8dab61
  4. added a commit that references this issue on Jun 4, 2024
    f3cd03b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions