Topic "Cannot get real path for '.'"

Author Message
haglerca
[View user's profile]

Joined: 2015-07-09
Posts: 2
Location: United States
The root directory is ...

Using WinSCP Version: 5.7.4
Windows 7 Enterprise
Transfer protocol SFTP
Using GUI(Commander interface) and .NET
.NET error message: ex.Message: Error getting name of current remote directory
- e {WinSCP.SessionRemoteException: Error getting name of current remote directory. ---> WinSCP.SessionRemoteException: Cannot get real

path for '.'.
The file path does not exist or is invalid.
Error code: 10
Error message from server (en): The file path does not exist or is invalid.
Steps to reproduce problem: GUI(Commander interface):
Open GUI
Click Login
GUI (Commander interface) error message:
Error getting name of current remote directory
Cannot get real path for '.'.
The file path does not exist or is invalid
Error Code: 10
Error message from server(en): The file path does not exist or is invalid.

Steps to reproduce problem:(.NET):
using C# Example code from documentation here(https://winscp.net/eng/docs/library#csharp) - I copied and pasted this C#.NET code example
When code hits the following line of code, error detailed above gets thrown - session.Open(sessionOptions)(which means the session wont open);

Without knowing to much, my suspicion is that WinSCP is looking at the current directory which is .(dot)
and it is not able to resolve this path. Is there a way in .NET code to configure WinSCP to look at a specific directory and not the .(dot)? I can control it with the Commander interface by going to Advnaced>Environment>Directories>Remote directory: (How do I do the equivalent in .NET code?) Or maybe a way for it to accept .(dot) ? I cant find any code that can be implemented prior to session.Open(sessionOptions) that would allow me to tell the session what directory it should be in.
Thanks in advance. Log file attached
log.log (945.45 KB) Private file

Description: (none)

haglerca
[View user's profile]

Joined: 2015-07-09
Posts: 2
Location: United States
The error was happening when trying to go to root directory because did not have permission to read the root directory on that server. Once permissions were updated, the issue resolved itself.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License