Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-21107

Raw repo folders with special characters created using UI cannot be deleted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.18.1, 3.20.1, 3.24.0, 3.25.0
    • Fix Version/s: 3.28.0
    • Component/s: Raw, UI
    • Notability:
      3

      Description

      A folder named https: that had been incorrectly added through the UI upload could not be deleted via the UI. There was no UI error or logged error, but the folder did not delete. It was possible to delete the assets associated with the folder and when the last asset was deleted, the folder deleted as well.

      A quick check shows some other examples of folders that can be created via the UI and not deleted including:
      test#/file.txt
      \test1\test2\file.txt

      There may be more.

      Folders with spaces in the cannot be deleted either: NEXUS-22773

      Expected: Deletion of a folder with special characters in it should succeed. All deletion attempts should be logged at INFO level. If something goes wrong, it should be logged at ERROR level.

      Workaround: Delete the files within the folder hierarchy one at a time, and the folders will be cleaned up once they are empty.

      Workaround 2: A groovy script can be used to delete the folder:

        import org.sonatype.nexus.repository.maintenance.MaintenanceService;
      
        repo = repository.getRepositoryManager().get("raw_repository")
        MaintenanceService maintenanceService = container.lookup(MaintenanceService.class.name)
        maintenanceService.deleteFolder(repo, "A Space")
      

       

      Another reproduce:

      Raw repo paths containing backslash are not removed from browse view on delete.

      To reproduce:

      1. Upload a file to a Raw repo. Set the path to contain a backslash e.g. /some\bad\path.
      2. The file will upload successfully but will not be visible when browsing the repo. Only the /some\bad\path folder will be visible.
      3. Delete this folder via the UI.

      Expected:

      1. Uploaded file is visible in browse view.
      2. Folder is removed from browse view on delete.

      Actual:

      1. Uploaded file is not visible in browse view.
      2. Folder is not removed from browse view on delete.

      Workaround (for removing deleted folders from view):

      Run "Repair - Rebuild repository browse" task against the repository.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bradbeck Brad Beck
              Reporter:
              cseney Cassandra Seney
              CC:
              Joseph Haggerty, Pamela Burek
              Last Updated By:
              Joseph Stephens
              Team:
              NXRM - Operations/Groot
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title

                    PagerDuty