Moving attachments may silently fail to move the actual file

XMLWordPrintable

      In com.atlassian.confluence.pages.persistence.dao.FileSystemAttachmentDataDao.moveAttachment(Attachment, Attachment, ContentEntityObject) we use com.atlassian.core.util.FileUtils.moveDir(File, File) to move the attachments to the new destination. But we never check the return value of moveDir() which may result in the metadata being updated but the file not being moved.
      We should throw an exception if the file couldn't be successfully moved, to rollback any changes to the attachment metadata.

              Assignee:
              Ryan
              Reporter:
              Chris Kiehl
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: