Merge pull request 'move sftp before mega' (#7) from reorder-mirrors-list into main

Reviewed-on: #7
This commit is contained in:
IsWaffle 2024-03-27 18:53:43 +00:00
commit 2060c5b3b4

View File

@ -48,6 +48,20 @@ namespace EftPatchHelper.Tasks
AnsiConsole.WriteLine("Added MEGA");
}
if (_settings.SftpUploads.Count > 0 && _options.UploadToSftpSites)
{
foreach (var sftpInfo in _settings.SftpUploads)
{
if (!sftpInfo.IsValid())
{
continue;
}
AnsiConsole.WriteLine($"Added SFTP: {sftpInfo.Hostname}");
_fileUploads.Add(new SftpUpload(patcherFile, sftpInfo));
}
}
if (_settings.UsingMega() && _options.UploadToMega)
{
var mega = new MegaUpload(patcherFile, _settings.MegaEmail, _settings.MegaPassword);
@ -56,20 +70,6 @@ namespace EftPatchHelper.Tasks
AnsiConsole.WriteLine("Added MEGA");
}
if (_settings.SftpUploads.Count > 0 && _options.UploadToSftpSites)
{
foreach (var sftpInfo in _settings.SftpUploads)
{
if (!sftpInfo.IsValid())
{
continue;
}
AnsiConsole.WriteLine($"Added SFTP: {sftpInfo.Hostname}");
_fileUploads.Add(new SftpUpload(patcherFile, sftpInfo));
}
}
return true;
}