Move tmp dir from /tmp/sparkleshare to ~/SparkleShare/.tmp
Works around an issue where Directory.Move doesn't work across different partitions.
This commit is contained in:
parent
8a041d4617
commit
e68fd74ed8
|
@ -21,17 +21,14 @@ using System.IO;
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
public static class SparklePaths {
|
public static class SparklePaths {
|
||||||
|
|
||||||
public static string SparkleTmpPath =
|
|
||||||
SparkleHelpers.CombineMore (Path.VolumeSeparatorChar.ToString (),
|
|
||||||
"tmp", "sparkleshare");
|
|
||||||
|
|
||||||
private static UnixUserInfo UnixUserInfo =
|
private static UnixUserInfo UnixUserInfo =
|
||||||
new UnixUserInfo (UnixEnvironment.UserName);
|
new UnixUserInfo (UnixEnvironment.UserName);
|
||||||
public static string HomePath = UnixUserInfo.HomeDirectory;
|
public static string HomePath = UnixUserInfo.HomeDirectory;
|
||||||
|
|
||||||
public static string SparklePath = Path.Combine (HomePath ,"SparkleShare");
|
public static string SparklePath = Path.Combine (HomePath ,"SparkleShare");
|
||||||
|
|
||||||
|
public static string SparkleTmpPath = Path.Combine (SparklePath, ".tmp");
|
||||||
|
|
||||||
public static string SparkleConfigPath =
|
public static string SparkleConfigPath =
|
||||||
SparkleHelpers.CombineMore (HomePath, ".config", "sparkleshare");
|
SparkleHelpers.CombineMore (HomePath, ".config", "sparkleshare");
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,9 @@ namespace SparkleShare {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Directory.Exists (SparklePaths.SparkleTmpPath))
|
||||||
|
Directory.CreateDirectory (SparklePaths.SparkleTmpPath);
|
||||||
|
|
||||||
if (!HideUI) {
|
if (!HideUI) {
|
||||||
// Create the status icon
|
// Create the status icon
|
||||||
NotificationIcon = new SparkleStatusIcon ();
|
NotificationIcon = new SparkleStatusIcon ();
|
||||||
|
|
Loading…
Reference in a new issue