FF-1001 - Created unpack flow element

This commit is contained in:
John Andrews
2023-07-07 17:12:56 +12:00
parent 477260685d
commit 7afa36f0c6
2 changed files with 4 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
<Nullable>enable</Nullable>
<FileVersion>1.1.1.528</FileVersion>
<ProductVersion>1.1.1.528</ProductVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishTrimmed>true</PublishTrimmed>
<Company>FileFlows</Company>
<Authors>John Andrews</Authors>

View File

@@ -53,6 +53,9 @@ public class Unpack: Node
}
string destDir = args.ReplaceVariables(DestinationPath, stripMissing: true, cleanSpecialCharacters: true);
destDir = args.MapPath(destDir);
if (Directory.Exists(destDir) == false)
Directory.CreateDirectory(destDir);
if (fileInfo.Extension.ToLower() == ".zip")
ZipFile.ExtractToDirectory(filename, destDir, true);