Use XDG_CACHE_HOME for avatar cache
Be nice with regard to XDG Base Directory Specification at http://standards.freedesktop.org/basedir-spec/latest/
This commit is contained in:
parent
b6430856c8
commit
ec1b89299a
|
@ -38,8 +38,16 @@ namespace SparkleShare {
|
||||||
SparkleHelpers.CombineMore ("usr", "share", "sparkleshare",
|
SparkleHelpers.CombineMore ("usr", "share", "sparkleshare",
|
||||||
"icons", "hicolor");
|
"icons", "hicolor");
|
||||||
|
|
||||||
public static string SparkleAvatarPath =
|
public static string SparkleAvatarPath {
|
||||||
Path.Combine (SparkleConfigPath, "avatars");
|
get {
|
||||||
|
string XDG_CACHE_HOME = Environment.GetEnvironmentVariable("XDG_CACHE_HOME");
|
||||||
|
if (XDG_CACHE_HOME != null) {
|
||||||
|
return Path.Combine (XDG_CACHE_HOME, "sparkleshare");
|
||||||
|
} else {
|
||||||
|
return SparkleHelpers.CombineMore (HomePath, ".cache", "sparkleshare");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static string SparkleIconPath =
|
public static string SparkleIconPath =
|
||||||
SparkleHelpers.CombineMore ("usr", "share", "icons", "hicolor");
|
SparkleHelpers.CombineMore ("usr", "share", "icons", "hicolor");
|
||||||
|
|
Loading…
Reference in a new issue