From 64bd9abd988b4716cce2a2b87a557f7760b449ab Mon Sep 17 00:00:00 2001 From: Schwirg László Date: Tue, 5 Sep 2023 14:25:53 +0200 Subject: [PATCH] v1.19.4.0 - exclude maszkot nem jol kezelte a csomagoláskor --- Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs | 4 ++-- Vrh.Log4Pro.MaintenanceConsole/Tools.cs | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs b/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs index 36ff39e..fec0a24 100644 --- a/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs +++ b/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.19.3.0")] -[assembly: AssemblyFileVersion("1.19.3.0")] +[assembly: AssemblyVersion("1.19.4.0")] +[assembly: AssemblyFileVersion("1.19.4.0")] diff --git a/Vrh.Log4Pro.MaintenanceConsole/Tools.cs b/Vrh.Log4Pro.MaintenanceConsole/Tools.cs index 0664cb7..9a3f759 100644 --- a/Vrh.Log4Pro.MaintenanceConsole/Tools.cs +++ b/Vrh.Log4Pro.MaintenanceConsole/Tools.cs @@ -115,7 +115,7 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ToolsNS if (File.Exists(ZIPfilefullpath)) { File.Delete(ZIPfilefullpath); } DirectoryInfo di = new DirectoryInfo(sourcefolderpath); var inclrgx = new Regex(includefullpathregex??""); - var exclrgx = new Regex(FileNameMaskListToRegex(excludefilenamemasklist) ?? ""); + var exclrgx = string.IsNullOrWhiteSpace(excludefilenamemasklist) ?null:new Regex(FileNameMaskListToRegex(excludefilenamemasklist)); var archivedfiles = new List(); using (ZipArchive archive = ZipFile.Open(ZIPfilefullpath, ZipArchiveMode.Create)) { @@ -127,7 +127,9 @@ namespace Vrh.Log4Pro.MaintenanceConsole.ToolsNS foreach (var fi in fis) { var entryname = storepathinzip ? fi.FullName.Substring((Path.GetPathRoot(fi.FullName)?.Length) ?? 0) : fi.Name; - if (inclrgx.Match(fi.FullName).Success && !exclrgx.Match(fi.Name).Success) + bool matchesinclude = (inclrgx?.Match(fi.FullName).Success)??true; + bool matchesexclude = (exclrgx?.Match(fi.Name).Success)??false; + if (matchesinclude && !matchesexclude) { try { -- libgit2 0.21.2