Skip to content
Snippets Groups Projects
Commit fc475b81 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Invert if-statement to reduce nesting

Relates to #20
parent f848218b
No related branches found
No related tags found
No related merge requests found
......@@ -185,15 +185,15 @@ namespace ATxCommon
}
_lastUpdateGraceLocation = DateTime.Now;
if (_expiredDirs.Count > 0) {
var detailCount = 0;
foreach (var toplevel in _expiredDirs.Keys) {
detailCount += _expiredDirs[toplevel].Count;
}
Log.Debug("Updated storage status: {0} top-level directories with a total of " +
"{1} expired sub-directories in grace location.",
_expiredDirs.Count, detailCount);
if (_expiredDirs.Count == 0)
return;
var detailCount = 0;
foreach (var toplevel in _expiredDirs.Keys) {
detailCount += _expiredDirs[toplevel].Count;
}
Log.Debug("Updated grace location status: {0} top-level directories with a total of " +
"{1} expired sub-directories found.", _expiredDirs.Count, detailCount);
}
/// <summary>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment