[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 ()
{
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);
}