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

chrislong98

Re: One quick question

Thank you Martin! :) My apologies for the misunderstanding. Thank you for your work with WinSCP! :)
martin

Re: One quick question

The only point of the RootPath is that when WinSCP validates the connection with the stateless protocols like WebDAV and S3, it needs to do it against a folder that is actually accessible (or even supports the protocol). It has no effect later on.

https://winscp.net/eng/docs/library_sessionoptions#rootpath:
Set, when the HTTP server root or S3 bucket list is not accessible.
chrislong98

One quick question

Martin, sorry to bother you, but one quick question. In my testing with WebDAV where a root is specified via RootPath and the connection opened to that root, I was surprised then to discover that I also had to specify that same root again when uploading files. I would have thought since the server connection was opened to that root path, that that was then the established root and everything else would be relative to it.
For instance, root path set to "/mysubfolder" in SessionOptions. Session started with /mysubfolder as the root. If I then use PutFiles etc, why do I again have to specify /mysubfolder in the destination? Wasn't the connection already started with that root?
I don't care, but just want to make sure I know what is what. Bottom line question: Does WinSCP always require any specified RootPath (for either WebDav or S3) to again be specified when putting/deleting files?
chrislong98

Sorry, my fault

Martin, Sorry for this. You can ignore. I would not have posted if I had not thought it was a bug, but it turns out this indeed appears to be a problem on my end. I haven't resolved yet but I can see that despite what I thought, that my previous usage of WebdavRoot never worked either and I have discovered the reason why. So sorry for posting! I'm usually good about ensuring it's not me before doing so. Thank you again for WinSCP!! :) Regards, Chris
chrislong98

SessionOptions.RootPath for WebDav does not work

Hi Martin,
You apparently obsoleted WebdavRoot and you say to use RootPath in its place, however, RootPath is not working for me here with WebDAV in 5.17.10. WebdavRoot no longer works either (that's what I was previously using). I can't get the root folder changed with the .NET assembly for WebDAV. The GUI works setting the remote folder on the server, but I can't do it via code with the assembly any more (pretty sure it's not a problem with my code - I literally just changed the previously working SessionOptions.WebdavRoot = "/myfolder" to SessionOptions.RootPath = "/myfolder". Same server, same folder. I can do it in GUI but not via code. The log shows that it just treats it as if it wasn't set and uses "/" as in:
". 2021-06-15 16:00:27.190 OPTIONS / HTTP/1.1"

Chris