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 ...@@ -185,15 +185,15 @@ namespace ATxCommon
} }
_lastUpdateGraceLocation = DateTime.Now; _lastUpdateGraceLocation = DateTime.Now;
if (_expiredDirs.Count > 0) { if (_expiredDirs.Count == 0)
var detailCount = 0; return;
foreach (var toplevel in _expiredDirs.Keys) {
detailCount += _expiredDirs[toplevel].Count; var detailCount = 0;
} foreach (var toplevel in _expiredDirs.Keys) {
Log.Debug("Updated storage status: {0} top-level directories with a total of " + detailCount += _expiredDirs[toplevel].Count;
"{1} expired sub-directories in grace location.",
_expiredDirs.Count, detailCount);
} }
Log.Debug("Updated grace location status: {0} top-level directories with a total of " +
"{1} expired sub-directories found.", _expiredDirs.Count, detailCount);
} }
/// <summary> /// <summary>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment