From 2f492c00f8c1aab2e1f81b9443a3e40d9ab2713a Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Wed, 14 Sep 2011 20:12:56 +0200 Subject: [PATCH] Remove .empty files when they are no longer needed --- SparkleLib/Git/SparkleRepoGit.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 6ce939c0..ac550904 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -522,8 +522,12 @@ namespace SparkleLib { FillEmptyDirectories (child_path); } - if (Directory.GetFiles (path).Length == 0) + if (Directory.GetFiles (path).Length == 0) { File.Create (Path.Combine (path, ".empty")); + + } else if (File.Exists (Path.Combine (path, ".empty"))) { + File.Delete (Path.Combine (path, ".empty")); + } }