repo git: also check for number of dirs before creating .empty file

This commit is contained in:
Hylke Bons 2011-11-30 15:04:56 +01:00
parent 1b5b07c195
commit 6ad39da458

View file

@ -533,8 +533,12 @@ namespace SparkleLib {
FillEmptyDirectories (child_path); FillEmptyDirectories (child_path);
} }
if (Directory.GetFiles (path).Length == 0 && !path.Equals (LocalPath)) if (Directory.GetFiles (path).Length == 0 &&
Directory.GetDirectories (path).Length == 0 &&
!path.Equals (LocalPath)) {
File.Create (Path.Combine (path, ".empty")).Close (); File.Create (Path.Combine (path, ".empty")).Close ();
}
} }