WorkingDirectory

Dec 12, 2012 at 4:13 PM
Edited Dec 12, 2012 at 4:16 PM

Sorry for my poor english.

When you want to upload a file, the method 'OpenWrite' calls 'OpenDataStream' which makes a 'CloneConnection'

But 'CloneConnection' doesn't clone the WorkingDirectory. 

 

 

FtpClient cl = new FtpClient();

cl.SetWorkingDirectory("TEST");

Stream ostream = cl.OpenWrite("test3.txt"))

etc.

 

I had in 'CloneConnection' Method:

conn.m_workingDirectory = m_workingDirectory;

 

And in 'OpenDataStream' method, i had

if (!string.IsNullOrEmpty(client.m_workingDirectory) && client.m_workingDirectory.Length > 1)                        
client.SetWorkingDirectory(client.m_workingDirectory);

 

just after

 

client.Connect();

 

Bye.

 

Coordinator
Dec 13, 2012 at 1:21 PM

I'm testing changes right now that should correct this problem. I will push them up shortly.