diff --git a/.editorconfig b/.editorconfig index 3eab4da..6ee246d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -109,7 +109,7 @@ dotnet_diagnostic.CA1001.severity = error # CA1001: Types that own disposable fi dotnet_diagnostic.CA1001.severity = none # Question - CA1001: Types that own disposable fields should be disposable dotnet_diagnostic.CA1051.severity = error # CA1051: Do not declare visible instance fields dotnet_diagnostic.CA1051.severity = none # Question - CA1051: Do not declare visible instance fields -dotnet_diagnostic.CA1416.severity = none # Question - CA1416: This call site is reachable on all platforms. 'EventLogEntryType.Error' is only supported on: 'windows'. +dotnet_diagnostic.CA1416.severity = error # Question - CA1416: This call site is reachable on all platforms. 'EventLogEntryType.Error' is only supported on: 'windows'. dotnet_diagnostic.CA1510.severity = none # Question - CA1510: Use 'ArgumentNullException.ThrowIfNull' instead of explicitly throwing a new exception instance dotnet_diagnostic.CA1511.severity = warning # CA1511: Use 'ArgumentException.ThrowIfNullOrEmpty' instead of explicitly throwing a new exception instance dotnet_diagnostic.CA1513.severity = warning # Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance diff --git a/src/OriginalToDeterministicHashCode/OriginalToDeterministicHashCode.csproj b/src/OriginalToDeterministicHashCode/OriginalToDeterministicHashCode.csproj index abebe2c..d06e489 100644 --- a/src/OriginalToDeterministicHashCode/OriginalToDeterministicHashCode.csproj +++ b/src/OriginalToDeterministicHashCode/OriginalToDeterministicHashCode.csproj @@ -12,9 +12,13 @@ + - + + + + \ No newline at end of file diff --git a/src/OriginalToDeterministicHashCode/Services/RenameService.cs b/src/OriginalToDeterministicHashCode/Services/RenameService.cs index c642e70..ed78ec7 100644 --- a/src/OriginalToDeterministicHashCode/Services/RenameService.cs +++ b/src/OriginalToDeterministicHashCode/Services/RenameService.cs @@ -195,9 +195,6 @@ public class RenameService : IRename, IDisposable throw new NotSupportedException("Too many sidecar files!"); foreach (FileHolder fileHolder in keyValuePair.Value) { - timeSpan = new(DateTime.Now.Ticks - ticks); - if (appSettings.RenameSettings.MaxMilliSecondsPerCall > timeSpan.TotalMilliseconds) - break; if (appSettings.RenameSettings.SidecarExtensions.Contains(fileHolder.ExtensionLowered)) continue; if (appSettings.RenameSettings.IgnoreExtensions.Contains(fileHolder.ExtensionLowered)) @@ -247,6 +244,9 @@ public class RenameService : IRename, IDisposable recordA = new(exifDirectory, fastForwardMovingPictureExpertsGroupUsed, fileInfo, filePath, new(sidecarFiles)); results.Add(recordA); } + timeSpan = new(DateTime.Now.Ticks - ticks); + if (appSettings.RenameSettings.MaxMilliSecondsPerCall > timeSpan.TotalMilliseconds) + break; } return results; }