repo git: catch exceptions creating .empty files. Fixes #733
This commit is contained in:
parent
f9675d3664
commit
900130bf8b
|
@ -736,8 +736,12 @@ namespace SparkleLib.Git {
|
||||||
!path.Equals (LocalPath)) {
|
!path.Equals (LocalPath)) {
|
||||||
|
|
||||||
if (!File.Exists (Path.Combine (path, ".empty"))) {
|
if (!File.Exists (Path.Combine (path, ".empty"))) {
|
||||||
File.WriteAllText (Path.Combine (path, ".empty"), "I'm a folder!");
|
try {
|
||||||
File.SetAttributes (Path.Combine (path, ".empty"), FileAttributes.Hidden);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue