From 19b568754072dc04234c04230f34c7ff956c16ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=B5=D0=BE=D1=80=D0=B3=D0=B8=D0=B9=20=D0=91=D0=B0?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Thu, 31 Mar 2022 11:54:22 +0500 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B2=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D0=BE=D0=B9?= =?UTF-8?q?=20=D0=B4=D0=B8=D1=80=D0=B5=D0=BA=D1=82=D0=BE=D1=80=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- figma_actions.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/figma_actions.js b/figma_actions.js index ff272d0..d948d8e 100644 --- a/figma_actions.js +++ b/figma_actions.js @@ -302,16 +302,19 @@ async function downloadFile(session, file, settings) { logger.info(`File ${title} is not downloaded during timeout`) } } - - if (fs.existsSync(tmpDownloadDir)) { - fs.rmdirSync(tmpDownloadDir); - } } catch (err) { console.error(err); return UNKNOWN_ERROR; } + try { + if (fs.existsSync(tmpDownloadDir)) { + fs.rmdirSync(tmpDownloadDir); + } + } catch (err) { + + } return 0; }