Skip to content

Commit

Permalink
patch(geodata): fix incorrect geodata search path /etc/dae/dae caused…
Browse files Browse the repository at this point in the history
… by #84. (#90)
  • Loading branch information
mzz2017 authored May 15, 2023
1 parent 5ae3d90 commit f15aa9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions common/assets/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ func (c *LocationFinder) GetLocationAsset(log *logrus.Logger, filename string) (
searchDirs = append(searchDirs, c.externDirs...)
if runtime.GOOS != "windows" {
// Search XDG data directories on non windows platform
searchDirs = append(searchDirs, xdg.DataHome)
searchDirs = append(searchDirs, xdg.DataDirs...)
for i := range searchDirs {
searchDirs[i] = filepath.Join(searchDirs[i], folder)
xdgDirs := append([]string{xdg.DataHome}, xdg.DataDirs...)
for i := range xdgDirs {
xdgDirs[i] = filepath.Join(xdgDirs[i], folder)
}
searchDirs = append(searchDirs, xdgDirs...)
} else {
// fallback to the old behavior of using only current dir on Windows
pwd := "./"
Expand Down

0 comments on commit f15aa9e

Please sign in to comment.