icetee / remote-ftp

FTP/FTPS/SFTP client for Atom.io
MIT License
555 stars 102 forks source link

Folders with space+squared brackets don't display their content #1200

Open dundunn opened 6 years ago

dundunn commented 6 years ago

Prerequisites

Description

You can't view the content of folders with a space followed by squared brackets in their name.

Steps to Reproduce

  1. Connect to an FTP server with Atom
  2. Create a folder with this pattern: "Name []"
  3. Create another folder in the previous created folder
  4. Try to expand the first folder.
  5. You are not able to see the second folder.

Here a screenshot (the first 5 folders are expanded but don't display their content): https://i.imgur.com/XYkKzuk.png

Expected behavior: The folder expands and displays its content.

Actual behavior: The folder expands but doesn't display its content.

Reproduces how often: 100%

Versions

Atom : 1.29.0 Electron: 2.0.5 Chrome: 61.0.3163.100 Node : 8.9.3

Additional Information

{
    "protocol": "ftp",
    "host": "************", // string - Hostname or IP address of the server. Default: 'localhost'
    "port": 21, // integer - Port number of the server. Default: 22
    "user": "************", // string - Username for authentication. Default: (none)
    "pass": "************", // string - Password for password-based user authentication. Default: (none)
    "promptForPass": false, // boolean - Set to true for enable password/passphrase dialog. This will prevent from using cleartext password/passphrase in this config. Default: false
    "remote": "/", // try to use absolute paths starting with /
    "agent": "", // string - Path to ssh-agent's UNIX socket for ssh-agent-based user authentication. Linux/Mac users can set "env" as a value to use env SSH_AUTH_SOCK variable. Windows users: set to 'pageant' for authenticating with Pageant or (actual) path to a cygwin "UNIX socket." Default: (none)
    "privatekey": "", // string - Absolute path to the private key file (in OpenSSH format). Default: (none)
    "passphrase": "", // string - For an encrypted private key, this is the passphrase used to decrypt it. Default: (none)
    "hosthash": "", // string - 'md5' or 'sha1'. The host's key is hashed using this method and passed to the hostVerifier function. Default: (none)
    "ignorehost": true,
    "connTimeout": 10000, // integer - How long (in milliseconds) to wait for the SSH handshake to complete. Default: 10000
    "keepalive": 10000, // integer - How often (in milliseconds) to send SSH-level keepalive packets to the server (in a similar way as OpenSSH's ServerAliveInterval config option). Set to 0 to disable. Default: 10000
    "keyboardInteractive": false, // boolean - Set to true for enable verifyCode dialog. Keyboard interaction authentication mechanism. For example using Google Authentication (Multi factor)
    "keyboardInteractiveForPass": false, // boolean - Set to true for enable keyboard interaction and use pass options for password. No open dialog.
    "watchTimeout":500, // integer - The duration ( in milliseconds ) from when the file was last changed for the upload to begin.
    "filePermissions":"0644" // string - Permissions for uploaded files. WARNING: if this option is set, previously set permissions on the remote are overwritten!
}
icetee commented 6 years ago

I do not see the mistake. Can you make a gif?

dundunn commented 6 years ago

https://i.imgur.com/PZag5Rk.gif

I noticed a related bug which is also shown at the end of the gif. You can see that the folder named "Test []" is completely messed up because there is a folder with the name "Test". You can expand the empty folders which have themselves in it and there are 4 files called "undefined". If you change something in this folder nothing on the FTP changes. This bug doesn't seem to occur only in Remote-FTP and I noticed it in Remote-Edit and FTP-Remote-Edit as well. On FileZilla everything runs fine.

icetee commented 6 years ago

I think the problem will be in the FTP package. I forked the original FTP package https://github.com/icetee/node-ftp a few things have been fixed. Each projects use this.

[ ] Can you tell the name of the server program? (example: Proftpd, Vsftpd) [ ] Who owns the folder?

dundunn commented 6 years ago

I don't know for certain because I don't have access but it's probably a Windows server with IIS. The folder is created by the FTP user which I currently use, but I don't know if the folder is owned by the FTP user.

icetee commented 6 years ago

Ahh, Windows server, I'm just looking at linux. This is important information.

I will try to see it soon.

dundunn commented 6 years ago

Nevermind it's a Linux server. I don't know what configuration and what FTP server is running though.

I talked to the admin and it's CentOS 7 with Pure-FTPd.