Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v 1.1.0 Transfer issue : Failed to change directory #876

Closed
Jozzeh opened this issue Jul 4, 2017 · 3 comments
Closed

v 1.1.0 Transfer issue : Failed to change directory #876

Jozzeh opened this issue Jul 4, 2017 · 3 comments
Assignees
Labels

Comments

@Jozzeh
Copy link

Jozzeh commented Jul 4, 2017

Remote FTP version 1.1.0 -- OS : Windows 10 -- Connection type : FTP

(note: this probably affects sftp as well)
When clicking a file in the remote pane, there is always an error notification that pops up in Atom which reads:

Remote FTP: Connection failed
550 Failed to change directory.

I have investigated and the error is triggered in the client.js file around line 531...
self.connector.on('response', ......

When a file is double-clicked in the 'remote pane', the get-function is called in ftp.js .
The first thing the get-function tries, is to cwd the path ( see line 167 and after in ftp.js ).
This fails because it is a file and not a directory --> leads to --> response emit 550 Failed to change directory.

After the error, it goes to the root directory and then downloads the file locally.
So except for an error notification when downloading a file, everything works.

Quick fix

I have temporary made a change to client.js line 532 to suppress the error notification :

if (code === 550 && !/No such file or directory/.test(text) && !/Failed to change directory/.test(text)) {

Although this is probably not the best way to go if anyone else is experiencing this issue, this could be a quick fix .

A better solution would be to somehow detect if the path has a filename at the end and skip the first cwd directly to the file.

@icetee icetee self-assigned this Jul 4, 2017
@icetee icetee added the bug label Jul 4, 2017
@Jozzeh
Copy link
Author

Jozzeh commented Jul 4, 2017

Update : Just tested on SFTP connection, and this issue is not an issue on SFTP connections .

@icetee
Copy link
Owner

icetee commented Jul 4, 2017

Update : Just tested on SFTP connection, and this issue is not an issue on SFTP connections .

SFTP is an encrypted protocol. You can not see communication. ;)

@peterbode1989
Copy link

peterbode1989 commented Jul 4, 2017

The hot-fix that worked for me was, adding this to rule 532:
!/Can't change directory to/.test(text)

PS. this is not a bug, just bad testing.

@icetee icetee closed this as completed in 09f674a Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants