From ef4b7af9e0f4171344c13ea2fec667e5123cafa1 Mon Sep 17 00:00:00 2001 From: kawaiizenbo <48113593+kawaiizenbo@users.noreply.github.com> Date: Fri, 10 Dec 2021 00:35:54 -0700 Subject: [PATCH] fix the delay --- RepoFullDownloader-Core/Program.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/RepoFullDownloader-Core/Program.cs b/RepoFullDownloader-Core/Program.cs index 6dc9737..ad6c034 100644 --- a/RepoFullDownloader-Core/Program.cs +++ b/RepoFullDownloader-Core/Program.cs @@ -25,7 +25,10 @@ namespace RepoFullDownloader_Core { Directory.CreateDirectory("./output/"); } - if(args.Length != 0) + // Load Options from 'options.json' + string optionsJson = File.ReadAllText("./options.json"); + options = JsonSerializer.Deserialize(optionsJson); + if (args.Length != 0) { string url = args[0]; if(!args[0].StartsWith("https://") && !args[0].StartsWith("http://")) @@ -38,7 +41,7 @@ namespace RepoFullDownloader_Core } try { - DownloadRepo(url, false); + DownloadRepo(url, options.originalFilenames); } catch(Exception) { @@ -57,10 +60,6 @@ namespace RepoFullDownloader_Core return; } - // Load Options from 'options.json' - string optionsJson = File.ReadAllText("./options.json"); - options = JsonSerializer.Deserialize(optionsJson); - foreach (Repo r in options.repos) { if (r.isInstaller)