From 0458cf826de30c71c9d0fe31e9c296875d623ac3 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sat, 4 Jun 2011 15:16:21 +0100 Subject: [PATCH] paths: Use more the more crossplatform Environment.SpecialFolder enumeration to determine used paths. --- SparkleLib/SparklePaths.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SparkleLib/SparklePaths.cs b/SparkleLib/SparklePaths.cs index 827769d2..7c648c36 100644 --- a/SparkleLib/SparklePaths.cs +++ b/SparkleLib/SparklePaths.cs @@ -25,13 +25,14 @@ namespace SparkleLib { public static class SparklePaths { - public static string HomePath = new UnixUserInfo (UnixEnvironment.UserName).HomeDirectory; + public static string HomePath = Environment.GetFolderPath (Environment.SpecialFolder.Personal); public static string SparklePath = Path.Combine (HomePath ,"SparkleShare"); public static string SparkleTmpPath = Path.Combine (SparklePath, ".tmp"); - public static string SparkleConfigPath = SparkleHelpers.CombineMore (HomePath, ".config", "sparkleshare"); - public static string SparkleKeysPath = SparkleHelpers.CombineMore (HomePath, ".config", "sparkleshare"); - public static string SparkleInstallPath = Path.Combine (Defines.PREFIX, "sparkleshare"); + public static string SparkleConfigPath = Path.Combine (Environment.GetFolderPath ( + Environment.SpecialFolder.ApplicationData), "sparkleshare"); public static string SparkleLocalIconPath = SparkleHelpers.CombineMore (SparkleConfigPath, "icons"); + + public static string SparkleInstallPath = Path.Combine (Defines.PREFIX, "sparkleshare"); public static string SparkleIconPath = SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "sparkleshare", "icons"); }