Skip to content

client.SetWorkingDirectory("..") changes working directory to \ #1820

@craig-beuker-enverus

Description

@craig-beuker-enverus

Greetings,

So I noticed recently that trying to do "SetWorkingDirectory("..")" to go to the parent directory, it's actually taking you to the root folder:

While sitting at a breakpoint in my code, from the immediate window in visual studio:

I am using the FtpClient class.

ftpClient.GetWorkingDirectory()
"/"  // all good, am at root
ftpClient.CreateDirectory("Lemon")
true   // all good, directory created
ftpClient.SetWorkingDirectory("Lemon")
Expression has been evaluated and has no value
ftpClient.GetWorkingDirectory()
"/Lemon"  // all good, am in my Lemon directory
ftpClient.CreateDirectory("Lime")
true  // all good, created Lime directory in Lemon directory
ftpClient.SetWorkingDirectory("Lime")
Expression has been evaluated and has no value
ftpClient.GetWorkingDirectory() 
"/Lemon/Lime"   // all good, am in my /Lemon/Lime directory
ftpClient.SetWorkingDirectory("..")  // to go back to parent directory /Lemon (so I thought) 
Expression has been evaluated and has no value
ftpClient.GetWorkingDirectory()
"/"  // ERROR:  Why am I not in /Lemon?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions