Skip to content

Uploading file multiple time with same mtime gives multiple version #468

@amrita-shrestha

Description

@amrita-shrestha

Describe the bug

While uploading file multiple time with same mtime, multiple version is created.

Storage

May be related to #468

Steps to reproduce

  @issue-391
  Scenario Outline: upload the same file more than twice with the same mtime and only one version is available
    Given using <dav-path-version> DAV path
    And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT"
    And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT"
    When user "Alice" uploads file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2019 04:18:13 GMT" using the WebDAV API
    Then the HTTP status code should be "204"


    Examples:
      | dav-path-version |
      | old              |
      | new              |
      | spaces           |

Expected behavior

  • And the version folder of file "/file.txt" for user "Alice" should contain "1" element
  • And as "Alice" the mtime of the file "file.txt" should be "Thu, 08 Aug 2019 04:18:13 GMT"

Actual behavior

        Failed step: And the version folder of file "/file.txt" for user "Alice" should contain "1" element
        Expected 1 versions but found 2 in 
        <?xml version="1.0"?>
        <d:multistatus xmlns:s="http://sabredav.org/ns" xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/remote.php/dav/meta/6c035932-221d-4a8a-ae6e-630f74fe866e$375cb2d7-1973-4699-8805-6128acc4e504%21147a666d-d16c-4fe7-831d-e6c7e31a0a33/</d:href><d:propstat><d:prop><d:getetag/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/meta/6c035932-221d-4a8a-ae6e-630f74fe866e$375cb2d7-1973-4699-8805-6128acc4e504%21147a666d-d16c-4fe7-831d-e6c7e31a0a33/v/147a666d-d16c-4fe7-831d-e6c7e31a0a33.REV.2019-08-08T04:18:13Z.1</d:href><d:propstat><d:prop><d:getetag>"2e01d52ebf7236b38937c26ea7836846"</d:getetag></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/meta/6c035932-221d-4a8a-ae6e-630f74fe866e$375cb2d7-1973-4699-8805-6128acc4e504%21147a666d-d16c-4fe7-831d-e6c7e31a0a33/v/147a666d-d16c-4fe7-831d-e6c7e31a0a33.REV.2019-08-08T04:18:13Z</d:href><d:propstat><d:prop><d:getetag>"2e01d52ebf7236b38937c26ea7836846"</d:getetag></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

Details

OC_main= eb6b50831

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions