Merge pull request #1122 from brandondahler/HistoryFix
Do not include /.git file in calculating subdirectory size
This commit is contained in:
commit
8eed12ff30
|
@ -1076,8 +1076,12 @@ namespace SparkleLib.Git {
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
foreach (DirectoryInfo directory in parent.GetDirectories ())
|
foreach (DirectoryInfo directory in parent.GetDirectories ()) {
|
||||||
|
// Do not include LocalPath/.git file if it is a subdirectory
|
||||||
|
// This will not affect calling CalculateSizes on /.git directly
|
||||||
|
if (directory.FullName != Path.Combine (LocalPath, ".git"))
|
||||||
size += CalculateSizes (directory);
|
size += CalculateSizes (directory);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
SparkleLogger.LogInfo ("Local", "Error calculating size", e);
|
SparkleLogger.LogInfo ("Local", "Error calculating size", e);
|
||||||
|
|
Loading…
Reference in a new issue