-
Notifications
You must be signed in to change notification settings - Fork 102
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
download-selected-local not working on Windows #1069
Comments
After reading up on Path.posix.normalize() it seems to me that this function will normalize the path according to the local operating system, which is why my Windows system ends up with \ as directory separator, which doesn't agree with my remote server's / directory separator |
I find it so good: const remotePath = Path.posix.normalize(Path.join(atom.project.remoteftp.root.remote + localPath)); |
hmm on my machine that results in an error:
edit: I left out a few lines from the error message, added them here |
I also get such an error message. The folder or file does not exist on the server. Maybe you can try to improve it in pull request? |
Sure I'd be glad to, I switched my machine to just do a replace of all \ with / I'll do some digging today to see if there's a better option and will put a pull request in with whatever I come up with |
Fix bug #1069 and fix download onceConnected call
Prerequisites
Description
I believe there is a problem with /lib/menus/commands.js on line 394 (the download-selected-local function). I added:
console.log("remotePath = '" + remotePath + "'");
on my Windows machine on line 395 to debug, and the output is like so:
remotePath = '/example.com/\htdocs\path\to\file.txt'
My remote server is a linux box, and the download is failing. To make matters worse, no error is generated, in fact the system thinks that the download was successful, and it proceeds to bring up the atom notification claiming that all transfers succeeded.
Steps to Reproduce
Expected behavior: [What you expect to happen]
the file is downloaded
Actual behavior: [What actually happens]
the file is not downloaded
Reproduces how often: [What percentage of the time does it reproduce?]
100%
Versions
Windows 10
Atom 1.22.1
Electron 1.6.15
Chrome 56.0.2924.87
Node 7.4.0
Remote FTP 2.0.0
Additional Information
I contributed the download-selected-local function a long time ago, but I had it set to modify the path like so:
I'm really not familiar with the Path.posix.normalize() function so I'm reading up on it now, and if I can come up with a fix I'll make a pull request. But hopefully someone else beats me to it, this can be a pretty serious issue if multiple people are sharing files and they think they downloaded a fresh copy of something when in fact they didn't
The text was updated successfully, but these errors were encountered: