From a1fb2ae4c376fd072887e044535b2d78a45ddaa4 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Tue, 15 Mar 2011 14:41:59 +0000 Subject: [PATCH] [controller] Clean up .tmp on quit --- SparkleShare/SparkleController.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/SparkleShare/SparkleController.cs b/SparkleShare/SparkleController.cs index fad2e71c..dd5e5d6a 100644 --- a/SparkleShare/SparkleController.cs +++ b/SparkleShare/SparkleController.cs @@ -1191,15 +1191,14 @@ namespace SparkleShare { public void Quit () { - foreach (SparkleRepo repo in Repositories) - repo.Dispose (); + // FIXME: this blocks +// foreach (SparkleRepo repo in Repositories) +// repo.Dispose (); - string pid_file_path = SparkleHelpers.CombineMore (SparklePaths.SparkleTmpPath, "sparkleshare.pid"); - - // Remove the process ID file - if (File.Exists (pid_file_path)) - File.Delete (pid_file_path); + if (Directory.Exists (SparklePaths.SparkleTmpPath)) + Directory.Delete (SparklePaths.SparkleTmpPath, true); + // FIXME: Never exits Environment.Exit (0); }