Package: xlshlt Version: xslhlt Severity: minor Tags: patch Dear Maintainer,
xslhlt package provides the standard configuration file /usr/share/xslthl/highlighters/xslthl-config.xml within. But unfortunately I always have to set filename explicitly by java command-line option «-Dxslthl.config» because xslhlt searches this file in a current directory by default. This behaviour is acceptable for general jar package, but in Debian system it is better to use system-wide configuration file (/usr/share/xslthl/highlighters /xslthl-config.xml) by default. This way eliminates inconvenient point with setting command-line argument for Java applications. -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (500, 'testing'), (500, 'stable'), (102, 'unstable'), (101, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.16-3-amd64 (SMP w/4 CPU cores) Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash
--- a/src/main/java/net/sf/xslthl/Config.java +++ b/src/main/java/net/sf/xslthl/Config.java @@ -408,9 +408,11 @@ logger.config("No config file specified, falling back to default behavior"); if (System.getProperty(CONFIG_PROPERTY) != null) { configFilename = System.getProperty(CONFIG_PROPERTY); - } else { + } else if (new File("xslthl-config.xml").isFile()) { configFilename = "xslthl-config.xml"; - } + } else { + configFilename = "/usr/share/xslthl/highlighters/xslthl-config.xml"; + } } logger.info(String.format("Loading Xslthl configuration from %s",