Remove GRUS_DIR flag
This commit is contained in:
parent
58644f4ccc
commit
af2a2cd8dc
|
@ -8,9 +8,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetDir returns grus data directory. Check if the user has set
|
// GetDir returns grus data directory. Check if the user has set
|
||||||
// GRUS_DIR, if not then check if XDG_DATA_HOME is set & if that is
|
// XDG_DATA_HOME is set & if that is not set then assume it to be the
|
||||||
// not set then assume it to be the default value which is
|
// default value which is $HOME/.local/share according to XDG Base
|
||||||
// $HOME/.local/share according to XDG Base Directory Specification.
|
// Directory Specification.
|
||||||
func GetDir() string {
|
func GetDir() string {
|
||||||
cacheDir := SysDir()
|
cacheDir := SysDir()
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ func GetDir() string {
|
||||||
// SysDir returns the system data directory, this is useful for unveil in
|
// SysDir returns the system data directory, this is useful for unveil in
|
||||||
// OpenBSD.
|
// OpenBSD.
|
||||||
func SysDir() string {
|
func SysDir() string {
|
||||||
cacheDir := os.Getenv("GRUS_DIR")
|
|
||||||
if len(cacheDir) == 0 {
|
if len(cacheDir) == 0 {
|
||||||
cacheDir = os.Getenv("XDG_DATA_HOME")
|
cacheDir = os.Getenv("XDG_DATA_HOME")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user