Skip to content

Commit

Permalink
FluentFTP -> 39.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmisek committed Jun 2, 2024
1 parent 72ad931 commit 5341784
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/Peachpie.Library/Ftp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ public static bool ftp_fget(PhpResource ftp_stream, PhpResource handle, string r
{
// Use the async version to prevent calling Write on the output stream, as it might be not allowed
// (e.g. in Kestrel)
return resource.Client.DownloadAsync(stream.RawStream, remotefile, resumepos).Result;
return resource.Client.DownloadStream(stream.RawStream, remotefile, resumepos);
}
catch (FtpException ex)
{
Expand Down Expand Up @@ -864,7 +864,7 @@ public static bool ftp_fput(PhpResource ftp_stream, string remote_file, PhpResou

try
{
return resource.Client.Upload(stream.RawStream, remote_file, FtpRemoteExists.Overwrite) != FtpStatus.Failed;
return resource.Client.UploadStream(stream.RawStream, remote_file, FtpRemoteExists.Overwrite) != FtpStatus.Failed;
}
catch (FtpException ex)
{
Expand Down Expand Up @@ -923,7 +923,7 @@ public static bool ftp_append(Context context, PhpResource ftp_stream, string re
/// Loads file on server.
/// </summary>
/// <returns>Returns TRUE on success or FALSE on failure.</returns>
private static bool Put(Context context, PhpResource ftp_stream, string remote_file, string local_file, int mode, bool append, int startpos)
private static bool Put(Context context, PhpResource ftp_stream, string remote_file, string local_file, int mode, bool addToEnd, int startpos)
{
var resource = ValidateFtpResource(ftp_stream);
if (resource == null)
Expand All @@ -944,7 +944,7 @@ private static bool Put(Context context, PhpResource ftp_stream, string remote_f

try
{
return resource.Client.UploadFile(localPath, remote_file, append ? FtpRemoteExists.Append : FtpRemoteExists.Overwrite) != FtpStatus.Failed;
return resource.Client.UploadFile(localPath, remote_file, addToEnd ? FtpRemoteExists.AddToEnd : FtpRemoteExists.Overwrite) != FtpStatus.Failed;
}
/* FtpException everytime wraps other exceptions (Message from server).
* https://github.com/robinrodricks/FluentFTP/blob/master/FluentFTP/Client/FtpClient_HighLevelUpload.cs#L595 */
Expand Down Expand Up @@ -1224,7 +1224,7 @@ public static int ftp_nb_fput(PhpResource ftp_stream, string remote_file, PhpRes

resource.PrepareForPendingOperation(mode);

resource.PendingOperationTask = resource.Client.UploadAsync(stream.RawStream, remote_file, FtpRemoteExists.Overwrite, false, null, resource.TokenSource.Token);
resource.PendingOperationTask = resource.Client.UploadStreamAsync(stream.RawStream, remote_file, FtpRemoteExists.Overwrite, false, null, resource.TokenSource.Token);

return TasksGetInfo(resource);
}
Expand Down Expand Up @@ -1289,7 +1289,7 @@ public static int ftp_nb_fget(PhpResource ftp_stream, PhpResource handle, string

resource.PrepareForPendingOperation(mode);

resource.PendingOperationTask = resource.Client.DownloadAsync(stream.RawStream, remote_file, resumepos, null, resource.TokenSource.Token);
resource.PendingOperationTask = resource.Client.DownloadStreamAsync(stream.RawStream, remote_file, resumepos, null, resource.TokenSource.Token);

return TasksGetInfo(resource);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Peachpie.Library/Peachpie.Library.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<ItemGroup>
<ProjectReference Include="..\Peachpie.Runtime\Peachpie.Runtime.csproj" />
<PackageReference Include="BCrypt.Net-Next" Version="4.0.2" />
<PackageReference Include="FluentFTP" Version="33.0.3" />
<PackageReference Include="FluentFTP" Version="39.4.0" />
<PackageReference Include="Isopoh.Cryptography.Argon2" Version="1.1.10" />
<PackageReference Include="Mono.Posix" Version="7.1.0-final.1.21458.1" />
<PackageReference Include="NGettext" Version="0.6.6" />
Expand Down

0 comments on commit 5341784

Please sign in to comment.