Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-7481

'CancelException' on 'beforeMove' is not reverting the path creation

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 3.7.0
    • Fix Version/s: 4.1.0
    • Component/s: None
    • Labels:
      None

      Description

      When writing a user plugin using 'beforeMove' method with 'CancelException' the file move is indeed revert but the path of the file remains.
      Steps to reproduce:
      1. Place the following user plugin in Artifactory:

      import org.artifactory.exception.CancelException
      storage {
              beforeMove {item, targetRepoPath, properties ->
                      log.warn "beforeMove"
                      throw new CancelException("not moving !", 405)
              }
      }
      

      2. Go to the UI and try to move a file that has a parent folder. (i.e. a/b/c.txt)
      3. The plugin should block the move and the file will remain in it's origin path.
      4. Go to the destination repository (press refresh) and you will see that the folders 'a/b/' are there.

        Attachments

          Activity

            People

            • Assignee:
              shayy Shay Yaakov (Inactive)
              Reporter:
              ariels Ariel Seftel
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: