Skip to content
Permalink
Browse files

attempted fix for #318

  • Loading branch information...
robinrodricks committed Jan 17, 2019
1 parent af2d743 commit 3fb06686dcfa3c5312c5aebcb9fda2a1bcacbb13
Showing with 11 additions and 1 deletion.
  1. +3 −0 FluentFTP/Client/FtpClient_Connection.cs
  2. +8 −1 FluentFTP/Client/FtpClient_LowLevel.cs
@@ -1199,6 +1199,9 @@ public async Task<FtpReply> GetReplyAsync()
// Create the parser even if the auto-OS detection failed
m_listParser.Init(m_systemType);

// FIX : #318 always set the type when we create a new connection
ForceSetDataType = true;

#if !CORE14
}
#endif
@@ -1376,6 +1376,8 @@ public virtual async Task<Stream> OpenAppendAsync(string path, FtpDataType type,

#region Set Data Type

protected bool ForceSetDataType = false;

/// <summary>
/// Sets the data type of information sent over the data stream
/// </summary>
@@ -1385,8 +1387,13 @@ public virtual async Task<Stream> OpenAppendAsync(string path, FtpDataType type,
lock (m_lock) {
#endif
// FIX : #291 only change the data type if different
if (CurrentDataType != type)
if (CurrentDataType != type || ForceSetDataType) {

// FIX : #318 always set the type when we create a new connection
ForceSetDataType = false;

this.SetDataTypeInternal(type);
}
#if !CORE14
}
#endif

0 comments on commit 3fb0668

Please sign in to comment.
You can’t perform that action at this time.