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


    • 3


      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:

      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.


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


      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.



        Issue Links



              bradbeck Brad Beck [X] (Inactive)
              cseney Cassandra Seney
              Joseph Haggerty, Pamela Burek
              Michael Prescott Michael Prescott
              NXRM - Groot
              0 Vote for this issue
              10 Start watching this issue