[controller] Clean up .tmp on quit

This commit is contained in:
Hylke Bons 2011-03-15 14:41:59 +00:00
parent 135e0d799d
commit a1fb2ae4c3

View file

@ -1191,15 +1191,14 @@ namespace SparkleShare {
public void Quit () public void Quit ()
{ {
foreach (SparkleRepo repo in Repositories) // FIXME: this blocks
repo.Dispose (); // foreach (SparkleRepo repo in Repositories)
// repo.Dispose ();
string pid_file_path = SparkleHelpers.CombineMore (SparklePaths.SparkleTmpPath, "sparkleshare.pid"); if (Directory.Exists (SparklePaths.SparkleTmpPath))
Directory.Delete (SparklePaths.SparkleTmpPath, true);
// Remove the process ID file
if (File.Exists (pid_file_path))
File.Delete (pid_file_path);
// FIXME: Never exits
Environment.Exit (0); Environment.Exit (0);
} }