Fix search path and log when testing.

This commit is contained in:
Michael Lipp 2023-06-11 17:47:59 +02:00
parent 6a1eef84c9
commit e1e4e9d0d0
3 changed files with 16 additions and 1 deletions

View file

@ -146,6 +146,7 @@ public class FsdUtils {
*
* 1. the current working directory,
* 1. the {@link #configHome(String)}
* 1. the subdirectory `appName` of `/etc/opt`
* 1. the subdirectory `appName` of `/etc`
*
* @param appName the application name
@ -156,6 +157,7 @@ public class FsdUtils {
String filename) {
var candidates = List.of(Path.of(filename),
configHome(appName).resolve(filename),
Path.of("/etc").resolve("opt").resolve(appName).resolve(filename),
Path.of("/etc").resolve(appName).resolve(filename));
for (var candidate : candidates) {
if (Files.exists(candidate)) {