Skip to content

OC-ConflictBasePath is missing when there was a conflict upload #6702

Closed

Description

@jnweiger

The PUT request that uploads a conflict file after the client detected a conflict, includes several headers with metadata about the conflict:

OC-Conflict:            1
OC-ConflictBaseEtag:    4d9bd6cb0b8d2d090aa09b06dad4944f
OC-ConflictBaseFileId:  04400434oce9akr7u3v9
OC-ConflictBaseMtime:   1533747765
X-OC-Mtime:             1533747765

The path of the conflicting file is not here. But it may be helpful information later. E.g. when the file on the server gets replaced with a new incarnation but same name.
A header with the path was promised in #4557 (comment) but not found in current code.

Activity

  1. changed the title [-]OC-ConflictBasePath is missing when there was a conflict[/-] [+]OC-ConflictBasePath is missing when there was a conflict upload[/+] on Aug 9, 2018
  2. jnweiger commented on Aug 9, 2018

    @jnweiger
    ContributorAuthor

    When the uploadConflictFiles feature is disabled, the client will silently ignore a file that I create via
    echo "not a conflict" > "filename (conflicted copy jwtest 2018-08-08 201107).txt"
    even if no corresponding filename.txt exists.

    Triggering any logic on the structure of such names is a hack.
    The conflict marker is currently hardcoded in
    https://github.com/owncloud/client/blob/master/src/common/utility.cpp#L558

    Proper meta data stored together with the conflict file on the server should help to obsolete such hacks!

  3. ckamm commented on Aug 14, 2018

    @ckamm
    Contributor

    @jnweiger I intentionally removed the path metadata as there is no guarantee that the base file location stays unchanged. The fileid and etag will clearly identify the path and even revision of the file as long as it hasn't been deleted and thus seemed much more durable than a path.

    Note that the path header was mentioned in a FYI WIP comment. Further integration documentation hopefully happens via https://github.com/owncloud/platform/issues/159

  4. ckamm commented on Aug 14, 2018

    @ckamm
    Contributor

    On the magic "(conflicted copy" tag: I agree that it's not pretty. With the added metadata the client would be able to stop depending on file name tags. But as long as the metadata isn't reliably available in all servers the client must be able to work without it.

    Note also that this is not new: previously the magic tag was "_conflict-"

  5. ogoffart commented on Aug 14, 2018

    @ogoffart
    Contributor

    @ckamm: I added the BasePath header in #6709

    It's true that fileid should be enough, but basePath is still a quite usefull information.

  6. ogoffart commented on Aug 14, 2018

    @ogoffart
    Contributor

    Longterm, we probably should support translating the "(conflicted copy" so we should indeed not rely on that. But that's out of scope for 2.5 I'd say.

  7. added this to the 2.5.0 milestone on Aug 19, 2018
  8. added
    ReadyToTest
    on Aug 19, 2018
  9. guruz commented on Aug 21, 2018

    @guruz
    Contributor

    Related: #6736

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ReadyToTest

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions