Skip to content

Commit

Permalink
Merge pull request robinrodricks#843 from FanDjango/CWD
Browse files Browse the repository at this point in the history
Invalidate PWD cache in ASYNC code also, this was missing
  • Loading branch information
robinrodricks authored Feb 13, 2022
2 parents 319c28c + 33f3378 commit 052d2ce
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 052d2ce

Please sign in to comment.