From 105515c655027faea08fbfe31ab102c04dc2870e Mon Sep 17 00:00:00 2001 From: Sandy Armstrong Date: Fri, 11 Jun 2010 10:58:40 -0700 Subject: [PATCH] Move tmp dir from /tmp/sparkleshare to ~/SparkleShare/.tmp Works around an issue where Directory.Move doesn't work across different partitions. --- SparkleShare/SparklePaths.cs | 7 ++----- SparkleShare/SparkleUI.cs | 3 +++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SparkleShare/SparklePaths.cs b/SparkleShare/SparklePaths.cs index 500041cf..1c3c59a2 100644 --- a/SparkleShare/SparklePaths.cs +++ b/SparkleShare/SparklePaths.cs @@ -21,17 +21,14 @@ using System.IO; namespace SparkleShare { public static class SparklePaths { - - public static string SparkleTmpPath = - SparkleHelpers.CombineMore (Path.VolumeSeparatorChar.ToString (), - "tmp", "sparkleshare"); - private static UnixUserInfo UnixUserInfo = new UnixUserInfo (UnixEnvironment.UserName); public static string HomePath = UnixUserInfo.HomeDirectory; 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"); diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index 93ca7e88..7ce78041 100644 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -80,6 +80,9 @@ namespace SparkleShare { } + if (!Directory.Exists (SparklePaths.SparkleTmpPath)) + Directory.CreateDirectory (SparklePaths.SparkleTmpPath); + if (!HideUI) { // Create the status icon NotificationIcon = new SparkleStatusIcon ();