repo git: catch exceptions creating .empty files. Fixes #733

This commit is contained in:
Hylke Bons 2012-05-20 12:51:09 +01:00
parent e2fc131e0e
commit ea432c32e8

View file

@ -736,8 +736,12 @@ namespace SparkleLib.Git {
!path.Equals (LocalPath)) {
if (!File.Exists (Path.Combine (path, ".empty"))) {
File.WriteAllText (Path.Combine (path, ".empty"), "I'm a folder!");
File.SetAttributes (Path.Combine (path, ".empty"), FileAttributes.Hidden);
try {
File.WriteAllText (Path.Combine (path, ".empty"), "I'm a folder!");
File.SetAttributes (Path.Combine (path, ".empty"), FileAttributes.Hidden);
} catch {
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Failed adding empty folder " + path);
}
}
}