From ddce679569d87986e277effa2c82571ce84ab387 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Thu, 18 Mar 2021 18:13:24 +0100 Subject: [PATCH] :zap: Minor changes to directories in binary data --- packages/core/src/NodeExecuteFunctions.ts | 4 +++- packages/editor-ui/src/components/RunData.vue | 4 ++-- packages/workflow/src/Interfaces.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/core/src/NodeExecuteFunctions.ts b/packages/core/src/NodeExecuteFunctions.ts index ab431fb5cc..b65b102495 100644 --- a/packages/core/src/NodeExecuteFunctions.ts +++ b/packages/core/src/NodeExecuteFunctions.ts @@ -103,7 +103,9 @@ export async function prepareBinaryData(binaryData: Buffer, filePath?: string, m const filePathParts = path.parse(filePath as string); - returnData.dir = filePathParts.dir; + if (filePathParts.dir !== '') { + returnData.directory = filePathParts.dir; + } returnData.fileName = filePathParts.base; // Remove the dot diff --git a/packages/editor-ui/src/components/RunData.vue b/packages/editor-ui/src/components/RunData.vue index 43f2a528ae..bc338fa9dc 100644 --- a/packages/editor-ui/src/components/RunData.vue +++ b/packages/editor-ui/src/components/RunData.vue @@ -157,9 +157,9 @@
File Name:
{{binaryData.fileName}}
-
+
Directory:
-
{{binaryData.dir}}
+
{{binaryData.directory}}
File Extension:
diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index 321b701284..6f22b903d6 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -9,7 +9,7 @@ export interface IBinaryData { data: string; mimeType: string; fileName?: string; - dir?: string; + directory?: string; fileExtension?: string; }