ashkulz / NppFTP

Plugin for Notepad++ allowing FTP, FTPS, FTPES and SFTP communications
https://ashkulz.github.io/NppFTP/
320 stars 93 forks source link

Problem when folder name contains colon (:) puntuation mark #272

Closed cecio30 closed 4 years ago

cecio30 commented 4 years ago

Description of the Issue

I upload a file to a folder with a colon mark in its name. The upload works but when I open file for editing, then save, the upload of updated file version fails because the destination folder name where the plugin tries to save the file contains no more the colon mark but an underscore mark. Of course the path is not found and an error is produced. See attached FTP log

Steps to Reproduce the Issue

220-IPv6 connections are also welcome on this server. 220 You will be disconnected after 5 minutes of inactivity. -> USER silosapp
331 User silosapp OK. Password required -> PASS HIDDEN 230 OK. Current restricted directory is / -> TYPE A
200 TYPE is now ASCII -> MODE S
200 S OK -> STRU F
200 F OK -> TYPE I
200 TYPE is now 8-bit binary -> PASV
227 Entering Passive Mode (198,91,81,6,121,24) -> STOR /public_html/bugNppFTp/012345554:AAKKrhgmJie3O7N8mXA7IqBe3V7aZfoIMKRA/test_bug.txt
150 Accepted data connection 226-File successfully transferred 226 0.144 seconds (measured here), 27.86 bytes per second Upload of /public_html/bugNppFTp/012345554:AAKKrhgmJie3O7N8mXA7IqBe3V7aZfoIMKRA/test_bug.txt succeeded. -> CWD /public_html/bugNppFTp/012345554:AAKKrhgmJie3O7N8mXA7IqBe3V7aZfoIMKRA/
250 OK. Current directory is /public_html/bugNppFTp/012345554:AAKKrhgmJie3O7N8mXA7IqBe3V7aZfoIMKRA -> PASV
227 Entering Passive Mode (198,91,81,6,118,150) -> LIST
150 Accepted data connection 226-Options: -a -l 226 3 matches total -> TYPE I
200 TYPE is now 8-bit binary -> SIZE /public_html/bugNppFTp/012345554:AAKKrhgmJie3O7N8mXA7IqBe3V7aZfoIMKRA/test_bug.txt
213 4 -> PASV
227 Entering Passive Mode (198,91,81,6,118,106) -> RETR /public_html/bugNppFTp/012345554:AAKKrhgmJie3O7N8mXA7IqBe3V7aZfoIMKRA/test_bug.txt
150 Accepted data connection 226-File successfully transferred 226 0.000 seconds (measured here), 48.91 Kbytes per second Download of /public_html/bugNppFTp/012345554:AAKKrhgmJie3O7N8mXA7IqBe3V7aZfoIMKRA/test_bug.txt succeeded, opening file. -> TYPE I
200 TYPE is now 8-bit binary -> PASV
227 Entering Passive Mode (198,91,81,6,120,25) -> STOR /public_html/bugNppFTp/012345554_AAKKrhgmJie3O7N8mXA7IqBe3V7aZfoIMKRA/test_bug.txt
553 Can't open that file: No such file or directory Upload of C:\Users\ASCHIMAS\AppData\Roaming\Notepad++\plugins\Config\NppFTP\Cache\silosapp@xo5.x10hosting.com\public_html\bugNppFTp\012345554_AAKKrhgmJie3O7N8mXA7IqBe3V7aZfoIMKRA\test_bug.txt failed

Expected Behavior

As you can see, the last operation fails because the string 012345554:AAKKrhgmJie3[...] is transformed by the plugin in 012345554_AAKKrhgmJie3[...] substituting the colon mark with the underscore mark

Actual Behavior

Debug Information

Notepad++ v7.8.2 (64-bit) Build time : Dec 4 2019 - 01:39:49 Path : C:\Program Files\Notepad++\notepad++.exe Admin mode : OFF Local Conf mode : OFF OS Name : Windows 7 Enterprise (64-bit) OS Build : 7601.0 Plugins : BigFiles.dll mimeTools.dll NppConverter.dll nppcrypt.dll NppExport.dll NppFTP.dll NPPJSONViewer.dll

nppftp 0.30.1 unicode

thanks a lot for your help

ashkulz commented 4 years ago

I don't think such filenames are going to be supported, given that Windows can't always read such files reliably (: is a special character).

chcg commented 4 years ago

Duplicate to #193 and #215.