fix the delay

This commit is contained in:
kawaiizenbo 2021-12-10 00:35:54 -07:00
parent ba13381799
commit ef4b7af9e0

View file

@ -25,7 +25,10 @@ namespace RepoFullDownloader_Core
{ {
Directory.CreateDirectory("./output/"); Directory.CreateDirectory("./output/");
} }
if(args.Length != 0) // Load Options from 'options.json'
string optionsJson = File.ReadAllText("./options.json");
options = JsonSerializer.Deserialize<Options>(optionsJson);
if (args.Length != 0)
{ {
string url = args[0]; string url = args[0];
if(!args[0].StartsWith("https://") && !args[0].StartsWith("http://")) if(!args[0].StartsWith("https://") && !args[0].StartsWith("http://"))
@ -38,7 +41,7 @@ namespace RepoFullDownloader_Core
} }
try try
{ {
DownloadRepo(url, false); DownloadRepo(url, options.originalFilenames);
} }
catch(Exception) catch(Exception)
{ {
@ -57,10 +60,6 @@ namespace RepoFullDownloader_Core
return; return;
} }
// Load Options from 'options.json'
string optionsJson = File.ReadAllText("./options.json");
options = JsonSerializer.Deserialize<Options>(optionsJson);
foreach (Repo r in options.repos) foreach (Repo r in options.repos)
{ {
if (r.isInstaller) if (r.isInstaller)