Skip to content

Commit

Permalink
Invalidate PWD cache in ASYNC code also, this was missing
Browse files Browse the repository at this point in the history
  • Loading branch information
FanDjango committed Feb 9, 2022
1 parent 22c896b commit 33f3378
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions FluentFTP/Client/FtpClient_Stream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ public async Task<FtpReply> ExecuteAsync(string command, CancellationToken token
commandTxt = "PASS ***";
}

// A CWD will invalidate the cached value.
if (command.StartsWith("CWD ", StringComparison.Ordinal)) {
_LastWorkingDir = null;
}

LogLine(FtpTraceLevel.Info, "Command: " + commandTxt);

// send command to FTP server
Expand Down

0 comments on commit 33f3378

Please sign in to comment.