From b2abfa6ad73bd565fd7ee7267c05601a974e3797 Mon Sep 17 00:00:00 2001 From: ltdrdata Date: Sun, 23 Apr 2023 23:32:48 +0900 Subject: [PATCH] subfolder fix on paste logic attach subfolder if subfolder isn't empty --- web/scripts/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/scripts/app.js b/web/scripts/app.js index 1c382eeb4..b3e88d46f 100644 --- a/web/scripts/app.js +++ b/web/scripts/app.js @@ -185,7 +185,10 @@ export class ComfyApp { } if(ComfyApp.clipspace.images != undefined) { - filename = `${ComfyApp.clipspace.images[0].filename} [${ComfyApp.clipspace.images[0].type}]`; + const clip_image = ComfyApp.clipspace.images[0]; + if(clip_image.subfolder != '') + filename = `${clip_image.subfolder}/`; + filename += `${clip_image.filename} [${clip_image.type}]`; } else if(ComfyApp.clipspace.widgets != undefined) { const index_in_clip = ComfyApp.clipspace.widgets.findIndex(obj => obj.name === 'image');