Skip to content

Commit 906b116

Browse files
committed
update FluentFTP to 44.0.1
1 parent 76f13d0 commit 906b116

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

ARKBreedingStats/ARKBreedingStats.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,10 +954,10 @@
954954
</ItemGroup>
955955
<ItemGroup>
956956
<PackageReference Include="FluentFTP">
957-
<Version>37.0.3</Version>
957+
<Version>44.0.1</Version>
958958
</PackageReference>
959959
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers">
960-
<Version>3.3.3</Version>
960+
<Version>3.3.4</Version>
961961
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
962962
<PrivateAssets>all</PrivateAssets>
963963
</PackageReference>

ARKBreedingStats/Form1.importSave.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using System.Threading.Tasks;
1414
using System.Windows.Forms;
1515
using ARKBreedingStats.utils;
16+
using FluentFTP.Exceptions;
1617

1718
namespace ARKBreedingStats
1819
{
@@ -176,7 +177,7 @@ await ImportSavegame.ImportCollectionFromSavegame(_creatureCollection, workingCo
176177
}
177178
}
178179
}
179-
var client = new FtpClient(ftpUri.Host, ftpUri.Port, credentials.Username, credentials.Password);
180+
var client = new AsyncFtpClient(ftpUri.Host, credentials.Username, credentials.Password, ftpUri.Port);
180181
string ftpPath = null;
181182

182183
try
@@ -193,7 +194,7 @@ await ImportSavegame.ImportCollectionFromSavegame(_creatureCollection, workingCo
193194
// TaskCanceledException
194195
// on cancelling it throws
195196
// Cannot access a disposed object. Object name: 'System.Net.Sockets.Socket'.
196-
await client.ConnectAsync(token: cancellationTokenSource.Token);
197+
await client.Connect(token: cancellationTokenSource.Token);
197198

198199
progressDialog.StatusText = "Finding most recent file";
199200
await Task.Yield();
@@ -219,7 +220,7 @@ await ImportSavegame.ImportCollectionFromSavegame(_creatureCollection, workingCo
219220
await Task.Yield();
220221

221222
var filePath = Path.Combine(workingCopyFolder, Path.GetFileName(ftpPath));
222-
await client.DownloadFileAsync(filePath, ftpPath, FtpLocalExists.Overwrite, FtpVerify.Retry, progressDialog, token: cancellationTokenSource.Token);
223+
await client.DownloadFile(filePath, ftpPath, FtpLocalExists.Overwrite, FtpVerify.Retry, progressDialog, token: cancellationTokenSource.Token);
223224
await Task.Delay(500, cancellationTokenSource.Token);
224225

225226
if (filePath.EndsWith(".gz"))
@@ -302,10 +303,10 @@ private async Task<string> DecompressGZippedFileAsync(string filePath, Cancellat
302303
return newFileName;
303304
}
304305

305-
public async Task<FtpListItem> GetLastModifiedFileAsync(FtpClient client, Uri ftpUri, string fileRegex, CancellationToken cancellationToken)
306+
public async Task<FtpListItem> GetLastModifiedFileAsync(AsyncFtpClient client, Uri ftpUri, string fileRegex, CancellationToken cancellationToken)
306307
{
307308
var folderUri = new Uri(ftpUri, ".");
308-
var listItems = await client.GetListingAsync(folderUri.AbsolutePath, cancellationToken);
309+
var listItems = await client.GetListing(folderUri.AbsolutePath, cancellationToken);
309310

310311
Regex fileNameRegex;
311312
if (!fileRegex.Contains("(?<"))

ARKBreedingStats/utils/ColorModeColors.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Drawing;
4-
using System.Drawing.Imaging;
5-
using System.Linq;
6-
using System.Text;
7-
using System.Threading.Tasks;
8-
using System.Web.Management;
1+
using System.Drawing;
92

103
namespace ARKBreedingStats.utils
114
{

0 commit comments

Comments
 (0)