allow for CUSTOM_DATA_DIRS variable

This commit is contained in:
2025-08-05 03:58:33 +02:00
parent c8f8e27a65
commit f35903bfb7

View File

@@ -256,9 +256,19 @@ func getAppDirs() []string {
home := os.Getenv("HOME")
//xdgDataHome := os.Getenv("XDG_DATA_HOME")
//xdgDataDirs := os.Getenv("XDG_DATA_DIRS")
if home != "" {
dirs = append(dirs, filepath.Join(home, "/my_applications"))
}
custom := os.Getenv("CUSTOM_DATA_DIRS")
if home != "" {
if custom == "" {
dirs = append(dirs, filepath.Join(home, "/my_applications"))
} else {
dirs = append(dirs, filepath.Join(home, custom))
}
}
log.Infof("App dirs: %v", dirs)