Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50901

EXCLUDE pattern fails to protect parent dir with deleteDir option

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ws-cleanup-plugin
    • None
    • Workspace Cleanup Plugin 0.34

      When using WsCleanup with a blacklist-based filter (only EXCLUDE type patterns) and the deleteDirs=true option, parent directories of explicitly excluded paths are not protected.

      As a result, the parent directory is then deleted recursively, also deleting the explicitly excluded child directory.

      If an exclude pattern matches a file, all parent directories (but not their contents!) would need to be implicitly excluded as well.

      The required logic is inverse from use cases where the parent directory would need to be included implicitly (e.g. a copy).

            olivergondza Oliver Gondža
            ext3h Andreas Ringlstetter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: