diff --git a/src/PollinationSDK/Wrapper/RunInfo.cs b/src/PollinationSDK/Wrapper/RunInfo.cs index 60ad0e31..3b5ee6d1 100644 --- a/src/PollinationSDK/Wrapper/RunInfo.cs +++ b/src/PollinationSDK/Wrapper/RunInfo.cs @@ -363,10 +363,9 @@ public List LoadLocalRunAssets(List runAssets, strin } else if (dup is RunOutputAsset output) { - var isFile = !Helper.IsDirectory(output.RelativePath); var relativeOutPath = output.RelativePath.Replace("/", @"\"); relativeOutPath = relativeOutPath.StartsWith(@"\") ? relativeOutPath : $@"\{relativeOutPath}"; - if (isFile) + if (output.IsFile) { var file = Directory.GetFiles(root, "*", SearchOption.AllDirectories).OrderBy(_ => _.Length).FirstOrDefault(_ => _.EndsWith(relativeOutPath)); dup.LocalPath = file; diff --git a/src/PollinationSDK/Wrapper/RunInputAsset.cs b/src/PollinationSDK/Wrapper/RunInputAsset.cs index 41425651..711f99a4 100644 --- a/src/PollinationSDK/Wrapper/RunInputAsset.cs +++ b/src/PollinationSDK/Wrapper/RunInputAsset.cs @@ -29,6 +29,9 @@ public RunInputAsset(Interface.Io.Inputs.IStep dagInput, string runSource = defa // cloud source: CLOUD:mingbo/demo/1D725BD1-44E1-4C3C-85D6-4D98F558DE7C // local source: LOCAL:C\Users\mingo\simulaiton\1D725BD1 this.RunSource = runSource; + + if (dagInput.IsPathType()) + this.PathType = dagInput is StepFolderInput ? "folder" : "file"; } public override AssetBase Duplicate() diff --git a/src/PollinationSDK/Wrapper/RunOutputAsset.cs b/src/PollinationSDK/Wrapper/RunOutputAsset.cs index 20151d4c..ade5616f 100644 --- a/src/PollinationSDK/Wrapper/RunOutputAsset.cs +++ b/src/PollinationSDK/Wrapper/RunOutputAsset.cs @@ -39,6 +39,10 @@ public RunOutputAsset(Interface.Io.Outputs.IDag dagOutput, string platform, stri // local source: LOCAL:C\Users\mingo\simulaiton\1D725BD1 this.RunSource = runSource; this.RelativePath = dagOutput.GetOutputPath(); + + if (dagOutput.IsPathType()) + this.PathType = dagOutput is DAGFolderOutput ? "folder" : "file"; + } public override object CheckOutputWithHandler(object inputData, HandlerChecker handlerChecker)