Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-60405

Moving a document to the same folder deletes the file from the store

    Details

      Description

      Steps to reproduce:

      1. Navigate to Content > Documents and Media
      2. Click on the + sign to add a Basic Document.
      3. Publish the document

      At this point if you check the file system (or other depending on the store) in the path data/document_library/ you should see the document that has been uploaded with a number like 1.0

      1. Try to move the document to the same folder (Home Folder)

      You will see an error in the UI "Your request failed to complete."

      If you check the file system store you will see that the file is gone, thus it cannot be downloaded.

      The reason why this is happening is because when the store is moving the file to the same location (same folder as it was) it will throw a DuplicateFileException (see FileSystemStore around line 339). Then, as it threw that exception, the IgnoreDuplicatesStore will delete that file and will try to repeat the operation. However, the file that was deleted was the exact same file that was going to be copied so it won't succeed.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 39 weeks, 3 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 Alpha 3