Hi, There seems to be a bug in which filenames are not quoted, or spaces are not escaped, when MDTM is issed by lftp.
I am trying to mirror a directory. The directory and the files in it each have spaces in their names (not by my choice ;). When lftp issues CWD into the directory, it works, but MDTM commands fail and when the files are retrieved, the timestamps are not preserved. Here's a bit of a log: lftp -c "open 192.168.1.2; mirror 'logs/foo/run 20081009-073139'" ---- Resolving host address... ---- 3 addresses found ---- Connecting to 192.168.1.2 (192.168.1.2) port 21 <--- 220-Cerberus FTP Server Personal Edition <--- 220-UNREGISTERED <--- 220-Welcome to Cerberus FTP Server <--- 220 Created by Grant Averett ---> FEAT <--- 500 Not logged in ---> USER anonymous <--- 331 User anonymous, password please ---> PASS lftp@ <--- 230 Password Ok, User logged in ---> PWD <--- 257 "/" is the current directory ---> CWD /logs/foo/run 20081009-073139 <--- 250 Change directory ok ---> PASV <--- 227 Entering Passive Mode (192,168,1,2,28,82) ---- Connecting data socket to (192.168.1.2) port 7250 ---- Data connection established ---> LIST <--- 150 Opening data connection ---- Got EOF on data connection ---- Closing data socket <--- 226 Transfer complete ---> TYPE I <--- 200 Type Binary ---> MDTM Embedded log 081009-073149.txt <--- 550 MDTM failed: Invalid path ---> MDTM Error 081009-073148.txt <--- 550 MDTM failed: Invalid path ---> MDTM Log_bb 081009-073139.txt <--- 550 MDTM failed: Invalid path ---> PASV Connecting with regular ftp and putting spaces around the filename allows MDTM to succeed. Without the spaces, it still fails via regular ftp client. This has also been observed at: http://www.cerberusftp.com/phpBB2/viewtopic.php?p=3079& I am able to mirror a group of files with no spaces in the filenames, from the same server, exactly as expected. On the first download all are retrieved with their correct timestamps are retrieved as the timestamps haven't changed. I am using lftp-3.7.0 on RHEL5. If this is not a bug, that's great, but I'm not sure what I'm doing wrong in that case... Curran Schiefelbein
