diff --git a/content-config/src/main/java/org/xbib/content/config/ConfigLoader.java b/content-config/src/main/java/org/xbib/content/config/ConfigLoader.java index 68ca979..de089f2 100644 --- a/content-config/src/main/java/org/xbib/content/config/ConfigLoader.java +++ b/content-config/src/main/java/org/xbib/content/config/ConfigLoader.java @@ -125,13 +125,17 @@ public class ConfigLoader { } private static List createListOfLocations(String applicationName, String fileNameWithoutSuffix) { + String xdgConfigHome = System.getenv("XDG_CONFIG_HOME"); + if (xdgConfigHome == null) { + xdgConfigHome = System.getProperty("user.home") + "/.config"; + } return List.of( applicationName + '-' + fileNameWithoutSuffix + YML, applicationName + '-' + fileNameWithoutSuffix + YAML, applicationName + '-' + fileNameWithoutSuffix + JSON, - System.getProperty("user.home") + "/." + applicationName + '/' + fileNameWithoutSuffix + YML, - System.getProperty("user.home") + "/." + applicationName + '/' + fileNameWithoutSuffix + YAML, - System.getProperty("user.home") + "/." + applicationName + '/' + fileNameWithoutSuffix + JSON, + xdgConfigHome + '/' + applicationName + '/' + fileNameWithoutSuffix + YML, + xdgConfigHome + '/' + applicationName + '/' + fileNameWithoutSuffix + YAML, + xdgConfigHome + '/' + applicationName + '/' + fileNameWithoutSuffix + JSON, "/etc/" + applicationName + '/' + fileNameWithoutSuffix + YML, "/etc/" + applicationName + '/' + fileNameWithoutSuffix + YAML, "/etc/" + applicationName + '/' + fileNameWithoutSuffix + JSON); diff --git a/gradle.properties b/gradle.properties index a411453..f7b7fd2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ group = org.xbib name = content -version = 2.6.1 +version = 2.6.2 gradle.wrapper.version = 6.6.1 xbib.net.version = 2.1.0