From 1668105e7c9689017cfbca6c485cff05fbb68c60 Mon Sep 17 00:00:00 2001 From: amasin76 Date: Tue, 12 Mar 2024 03:44:19 +0000 Subject: [PATCH] Fix #14: create existing directory gracefully --- src/pages/content/scrapeFilesNames.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/content/scrapeFilesNames.ts b/src/pages/content/scrapeFilesNames.ts index eee455e..6ac6cf3 100644 --- a/src/pages/content/scrapeFilesNames.ts +++ b/src/pages/content/scrapeFilesNames.ts @@ -45,7 +45,7 @@ function generateCommandLine(dirName: string | undefined, fileNames: string[]): const subDirs = new Set(); if (dirName === undefined) return (commandLine = "No files or dirs got found."); - commandLine = `mkdir "${dirName}" && cd "${dirName}" && touch README.md `; + commandLine = `mkdir -p "${dirName}" && cd "${dirName}" && touch README.md `; fileNames.forEach((fileName) => { const parts = fileName.split("/");