1
0
Fork 0
mirror of https://github.com/fiso64/slsk-batchdl.git synced 2024-12-22 06:22:41 +00:00
This commit is contained in:
fiso64 2024-05-17 22:32:51 +02:00
parent 4a3e8ddadb
commit 87fdff13cd

View file

@ -365,14 +365,20 @@ static class Program
bool confPathChanged = false;
int idx = Array.LastIndexOf(args, "--config");
int idx2 = Array.LastIndexOf(args, "--conf");
idx = idx > -1 ? idx : idx2;
if (idx != -1)
{
confPath = args[idx + 1];
confPathChanged = true;
}
if (System.IO.File.Exists(confPath) || confPathChanged)
if ((File.Exists(confPath) || confPathChanged) && confPath != "none")
{
if (confPathChanged && !File.Exists(confPath))
{
confPath = Path.Join(AppDomain.CurrentDomain.BaseDirectory, confPath);
}
string confArgs = System.IO.File.ReadAllText(confPath);
List<string> finalArgs = new List<string>();
finalArgs.AddRange(ParseCommand(confArgs));
@ -418,6 +424,7 @@ static class Program
case "--path":
parentFolder = args[++i];
break;
case "--conf":
case "--config":
confPath = args[++i];
break;
@ -580,6 +587,7 @@ static class Program
downloadMaxStaleTime = int.Parse(args[++i]);
break;
case "--cp":
case "--cd":
case "--processes":
case "--concurrent-processes":
case "--concurrent-downloads":