Skip to content

Commit

Permalink
fix multiple reported issues
Browse files Browse the repository at this point in the history
  • Loading branch information
robinrodricks committed May 2, 2018
1 parent ffe0de3 commit ac6ef5c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
3 changes: 2 additions & 1 deletion FluentFTP/Client/FtpClient_Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1765,7 +1765,8 @@ private string GetAbsolutePath(string path) {
else
path = "./";

} else if (!path.StartsWith("/")) {
// FIX : #153 ensure this check works with unix & windows
} else if (!path.StartsWith("/") && path.Substring(1, 1) != ":") {

// if relative path given then add working dir to calc full path
string pwd = GetWorkingDirectory();
Expand Down
4 changes: 3 additions & 1 deletion FluentFTP/Client/FtpClient_LowLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,9 @@ protected void SetDataType(FtpDataType type) {
#if !CORE14
lock (m_lock) {
#endif
this.SetDataTypeInternal(type);
// FIX : #291 only change the data type if different
if (CurrentDataType != type)
this.SetDataTypeInternal(type);
#if !CORE14
}
#endif
Expand Down
4 changes: 4 additions & 0 deletions FluentFTP/Stream/FtpSocketStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ public bool IsConnected {

if (m_socketPollInterval > 0 && DateTime.Now.Subtract(m_lastActivity).TotalMilliseconds > m_socketPollInterval) {
FtpTrace.WriteStatus(FtpTraceLevel.Verbose, "Testing connectivity using Socket.Poll()...");

// FIX : #273 update m_lastActivity to the current time
m_lastActivity = DateTime.Now;

if (m_socket.Poll(500000, SelectMode.SelectRead) && m_socket.Available == 0) {
Close();
return false;
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1338,11 +1338,16 @@ This is not a bug in FluentFTP. RFC959 says that EOF on stream mode transfers is
## Release Notes
#### 19.2.0
- Fix: Prevent socket poll from hammering the server multiple times per second
- Fix: Allow using absolute paths that include drive letters (Windows servers)
- Performance improvement: Only change the FTP data type if different from required type
#### 19.1.4
- Fix: Fix hang in TLS activation because no timeout is set on the underlying NetworkStream (thanks @iamjay)
#### 19.1.3
- Fix: Added async versions of FTP methods to IFtpClient (thanks @peterfortuin)
- Added async versions of FTP methods to IFtpClient (thanks @peterfortuin)
- Fix: Fixes when ActivePorts is specified in active FTP mode (thanks @ToniMontana)
- Fix: Throw OperationCanceledException instead of FtpException when cancellation is requested (thanks @taoyouh)
Expand Down

0 comments on commit ac6ef5c

Please sign in to comment.