Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: PutFiles uploading files to parent folder after upgrading to v6.3.6 (OpenVMS)

You might get the previous behaviour by setting FtpWorkFromCwd to off:
https://winscp.net/eng/docs/rawsettings
harkapobi

PutFiles uploading files to parent folder after upgrading to v6.3.6 (OpenVMS)

After upgrading from WinSCP version 5.17.10 to 6.3.6 (.Net) the PutFiles method is now uploading files to the folder above the home folder.

This is the code (which hasn't changed)
var sessionOptions = new SessionOptions
{
    Protocol = Protocol.Ftp,
    HostName = url,
    UserName = username,
    Password = password,
    PortNumber = 21
};
 
if (!string.IsNullOrEmpty(proxyPort))
{
    sessionOptions.AddRawSettings("ProxyHost", proxy);
    sessionOptions.AddRawSettings("ProxyPort", proxyPort);
}
 
using (var session = new Session())
{
    session.Open(sessionOptions);
 
    var transferOptions = new TransferOptions();
    transferOptions.TransferMode = TransferMode.Ascii;
 
    var transferResult = session.PutFiles(filePath, "/", options: transferOptions);
 
    transferResult.Check();
}

Looking at the logs, the newer version calls CDUP just before uploading the file. I have no idea why. Logs for each version are attached (with usernames, server names etc. replaced)

Is there a way I can get it working using the later version?