From c17c106533703d54540bd94c98278a6bd1c9a553 Mon Sep 17 00:00:00 2001 From: Eugene Chung Date: Thu, 7 Oct 2021 15:10:44 -0400 Subject: [PATCH 1/2] updated working folders --- kimchi-ssg/helpers.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kimchi-ssg/helpers.cs b/kimchi-ssg/helpers.cs index abd86e3..5ae4330 100644 --- a/kimchi-ssg/helpers.cs +++ b/kimchi-ssg/helpers.cs @@ -170,7 +170,8 @@ public static void parseJSON(string jsonstring, string extension, string pout) { if (dict.ContainsKey("output")) { - strToFile(builtString[1], builtString[3]); + strToFile(builtString[1], dict["output"]); + pout = dict["output"]; } else { @@ -260,10 +261,11 @@ public static void strToFile(string s, string output) if(output == "" || output == null){ output = "dist"; } - + Console.WriteLine(output); if (Directory.Exists(txtDirectory+ substr + output)) { - Directory.Delete(txtDirectory + substr + output, true); + Console.WriteLine("DELTE"); + //Directory.Delete(txtDirectory + substr + output, true); } Directory.CreateDirectory(txtDirectory + substr + output); From e59902e98d817f24a4cdf515343244b8972a2c23 Mon Sep 17 00:00:00 2001 From: Eugene Chung Date: Thu, 7 Oct 2021 15:12:10 -0400 Subject: [PATCH 2/2] updated folders to be able to create new output folder --- kimchi-ssg/helpers.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kimchi-ssg/helpers.cs b/kimchi-ssg/helpers.cs index 5ae4330..dd950e3 100644 --- a/kimchi-ssg/helpers.cs +++ b/kimchi-ssg/helpers.cs @@ -261,11 +261,10 @@ public static void strToFile(string s, string output) if(output == "" || output == null){ output = "dist"; } - Console.WriteLine(output); + if (Directory.Exists(txtDirectory+ substr + output)) { - Console.WriteLine("DELTE"); - //Directory.Delete(txtDirectory + substr + output, true); + Directory.Delete(txtDirectory + substr + output, true); } Directory.CreateDirectory(txtDirectory + substr + output);