Merge pull request #1122 from brandondahler/HistoryFix
Do not include /.git file in calculating subdirectory size
This commit is contained in:
commit
d3a04ed753
|
@ -1076,8 +1076,12 @@ namespace SparkleLib.Git {
|
|||
|
||||
|
||||
try {
|
||||
foreach (DirectoryInfo directory in parent.GetDirectories ())
|
||||
size += CalculateSizes (directory);
|
||||
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);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
SparkleLogger.LogInfo ("Local", "Error calculating size", e);
|
||||
|
|
Loading…
Reference in a new issue