diff --git a/Instance/DlibDotNet.cs b/Instance/DlibDotNet.cs index ae8445c..8dccc2a 100644 --- a/Instance/DlibDotNet.cs +++ b/Instance/DlibDotNet.cs @@ -457,15 +457,9 @@ public partial class DlibDotNet } } if (result) - { - if (result) - { } - } + result = true; if (!result) - { - if (!result) - { } - } + result = false; return result; } diff --git a/Shared/Models/Stateless/Methods/Container.cs b/Shared/Models/Stateless/Methods/Container.cs index 2e4a7ea..c24ea22 100644 --- a/Shared/Models/Stateless/Methods/Container.cs +++ b/Shared/Models/Stateless/Methods/Container.cs @@ -88,7 +88,12 @@ internal abstract class Container bool? fileSizeChanged = property is not null ? property.FileSize != filePath.Length : null; bool isValidImageFormatExtension = propertyConfiguration.ValidImageFormatExtensions.Contains(filePath.ExtensionLowered); if (property is not null && property.Keywords is not null && !IId.IsIgnore(filePath) && propertyConfiguration.IgnoreRulesKeyWords.Any(l => property.Keywords.Contains(l))) - throw new NotSupportedException($"Rename File! <{filePath.FileNameFirstSegment}>"); + { + if (filePath.DirectoryName.Contains("Results") && filePath.DirectoryName.Contains("Resize")) + File.Delete(filePath.FullName); + else + throw new NotSupportedException($"Rename File! <{filePath.FileNameFirstSegment}>"); + } string relativePath = IPath.GetRelativePath(filePair.Path, rootDirectoryLength, forceExtensionToLower: true); bool? lastWriteTimeChanged = property is not null ? propertyConfiguration.PropertiesChangedForProperty || property.LastWriteTime.Ticks != filePath.LastWriteTicks : null; if (filePair.Match is not null)