Fix env XDG_DATA_DIRS makes catagory disappear

This commit is contained in:
vescrity
2024-11-19 19:44:09 +08:00
parent c0eb0965a8
commit 1b61a42b10

View File

@@ -240,7 +240,8 @@ func dataDir() string {
}
for _, d := range strings.Split(xdgDataDirs, ":") {
p := filepath.Join(d, "nwg-drawer")
if pathExists(p) {
q := filepath.Join(p, "desktop-directories")
if pathExists(q) {
log.Infof("Data dir: %v", p)
return p
}