fixing zip issues

This commit is contained in:
John Andrews
2024-05-10 21:33:20 +12:00
parent 74daa7a2b0
commit 349eabf48e
3 changed files with 5 additions and 4 deletions

View File

@@ -76,9 +76,11 @@ public class Zip : Node
try
{
args.Logger?.ILog("Path[0]:" + (Path?.EmptyAsNull() ?? "Use working file"));
var path = string.IsNullOrWhiteSpace(Path)
? args.WorkingFile
: args.ReplaceVariables(Path, stripMissing: true);
args.Logger?.ILog("Path[1]:" + path);
if (args.FileService.DirectoryExists(path).Is(true))
{
@@ -107,14 +109,13 @@ public class Zip : Node
}
else
{
destDir = args.ReplaceVariables(destDir, stripMissing: true);
// in case they set a linux path on windows or vice versa
destDir = destDir.Replace('\\', args.FileService.PathSeparator);
destDir = destDir.Replace('/', args.FileService.PathSeparator);
args.Logger?.ILog("Destination Directory: " + destDir);
destDir = args.ReplaceVariables(destDir, stripMissing: true);
// this converts it to the actual OS path
destDir = FileHelper.GetDirectory(destDir);
args.FileService.DirectoryCreate(destDir);
}

Binary file not shown.

Binary file not shown.