You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Peter Kriens (Jira)" <ji...@apache.org> on 2022/06/21 15:57:00 UTC
[jira] [Created] (FELIX-6543) Skip non-config files in Dictionary enumeration
Peter Kriens created FELIX-6543:
-----------------------------------
Summary: Skip non-config files in Dictionary enumeration
Key: FELIX-6543
URL: https://issues.apache.org/jira/browse/FELIX-6543
Project: Felix
Issue Type: Improvement
Components: Configuration Admin
Reporter: Peter Kriens
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?
--
This message was sent by Atlassian Jira
(v8.20.7#820007)