mirror of https://github.com/perkeep/perkeep.git
Merge "osutil: change paths to be xdg compliant"
This commit is contained in:
commit
268ba3aa8e
|
@ -76,7 +76,10 @@ func CamliConfigDir() string {
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
return filepath.Join(os.Getenv("APPDATA"), "Camlistore")
|
return filepath.Join(os.Getenv("APPDATA"), "Camlistore")
|
||||||
}
|
}
|
||||||
return filepath.Join(HomeDir(), ".camlistore")
|
if xdg := os.Getenv("XDG_CONFIG_HOME"); xdg != "" {
|
||||||
|
return filepath.Join(xdg, "camlistore")
|
||||||
|
}
|
||||||
|
return filepath.Join(HomeDir(), ".config", "camlistore")
|
||||||
}
|
}
|
||||||
|
|
||||||
func UserServerConfigPath() string {
|
func UserServerConfigPath() string {
|
||||||
|
@ -84,7 +87,7 @@ func UserServerConfigPath() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func UserClientConfigPath() string {
|
func UserClientConfigPath() string {
|
||||||
return filepath.Join(CamliConfigDir(), "config")
|
return filepath.Join(CamliConfigDir(), "client-config.json")
|
||||||
}
|
}
|
||||||
|
|
||||||
func IdentitySecretRing() string {
|
func IdentitySecretRing() string {
|
||||||
|
|
Loading…
Reference in New Issue