Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-6543

Skip non-config files in Dictionary enumeration

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Configuration Admin
    • None

    Description

      Configuration Admin enumerates a directory to find existing configuration files. This enumeration skips temporary files but it does not check of the file is actually a configuration file.

      I can create a PR that changes line https://github.com/apache/felix-dev/blob/eb99876e44791648939cb0fc7fdee22f00ed27b8/configadmin/src/main/java/org/apache/felix/cm/file/FilePersistenceManager.java#L884 so that only files with the .config extension are enumerated.

      This is problematic for a customer since they might have alternative files in this directory. Although this might not be the best practice, some file systems add files, like Apple adds a `.DS_Store` file and sometimes you a .gitignore in testing directories. Also, the current code can as far as I know not create any but ending in `.config` so enumerating other files is fragile.

      Would such a PR be acceptable in principle?

      Attachments

        Activity

          People

            Unassigned Unassigned
            pkriens Peter Kriens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: