diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-25 17:59:11 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-25 17:59:11 -0800 |
commit | e1245fbd2ec2051392b98a57a8002a4bf3c2c753 (patch) | |
tree | 30c00d64f76f7a08a2978c5e3acb0ce0ccdda9bd /src | |
parent | 4d690fb9dd48a47d0408b9db4cd1b73124eecdea (diff) | |
download | DotNetOpenAuth-e1245fbd2ec2051392b98a57a8002a4bf3c2c753.zip DotNetOpenAuth-e1245fbd2ec2051392b98a57a8002a4bf3c2c753.tar.gz DotNetOpenAuth-e1245fbd2ec2051392b98a57a8002a4bf3c2c753.tar.bz2 |
Fixed bug where unloaded counters were not reset when submitting a report.
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth/Reporting.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth/Reporting.cs b/src/DotNetOpenAuth/Reporting.cs index 7045aed..15af4ba 100644 --- a/src/DotNetOpenAuth/Reporting.cs +++ b/src/DotNetOpenAuth/Reporting.cs @@ -347,6 +347,13 @@ namespace DotNetOpenAuth { counter.Reset(); counter.Flush(); } + + // We can just delete the files for counters that are not currently loaded. + foreach (string eventFile in file.GetFileNames("event-*.txt")) { + if (!events.Values.Any(e => string.Equals(e.FileName, eventFile, StringComparison.OrdinalIgnoreCase))) { + file.DeleteFile(eventFile); + } + } } return true; |