fixing copy file

This commit is contained in:
John Andrews
2022-05-21 21:28:43 +12:00
parent 47d845e70f
commit f5d4e32b93
2 changed files with 38 additions and 3 deletions
+4 -2
View File
@@ -77,8 +77,10 @@ namespace FileFlows.BasicNodes.File
}
args.Logger.ILog($"CopyFile.Dest[5] '{dest}'");
var destDir = new FileInfo(dest).DirectoryName;
args.CreateDirectoryIfNotExists(destDir ?? String.Empty);
// cant use new FileInfo(dest).Directory.Name here since
// if the folder is a linux folder and this node is running on windows
// /mnt, etc will be converted to c:\mnt and break the destination
var destDir = dest.Substring(0, dest.Replace("\\", "/").LastIndexOf("/"));
if(string.IsNullOrEmpty(DestinationFile) == false)
{