[
https://issues.apache.org/jira/browse/FELIX-6543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17570698#comment-17570698
]
Carsten Ziegeler commented on FELIX-6543:
-----------------------------------------
Yes, I agree that makes sense to. The code can only create .config files
We might also want to revisit the check at
https://github.com/apache/felix-dev/blob/eb99876e44791648939cb0fc7fdee22f00ed27b8/configadmin/src/main/java/org/apache/felix/cm/file/FilePersistenceManager.java#L892
as a dictionary without a service pid is not usable later on. So returning
dictionaties without that does not make sense.
> 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
> Priority: Minor
>
> 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.10#820010)