Description of problem: If a directory on an FTP server contains a file or directory whose name begins with a number that looks like a year, mc thinks it's the year of mtime and takes the rest as name, which results in an invalid and unusable item in the directory listing. Version-Release number of selected component (if applicable): mc-4.6.1a-4.FC4 How reproducible: Always Steps to Reproduce: 1. on an FTP server: touch "2000 a" 2. on local host: run mc, cd /#ftp:USER@HOST, go to the directory with the 'specially crafted' file name and scroll down to see it (if necessary) Actual results: You'll see a file named 'a' with mtime set to current day and month but year 2000. Additionally, it won't be possible to copy this file because it really doesn't exist on the server as 'a'. It's similar if you create a directory with name like `YYYY something'. Expected results: Well, guess what... :) Additional info: It seems to me like it's confused by the output from server which looks like: -rw-rw-r-- 1 500 500 0 Jan 20 16:35 2000 a and there is a bug in mc's mtime parsing code.
This is now fixed in CVS. We do not longer attempt to parse more than 3 date elements.
Hi Leonard, unfortunately I cannot find any fix for this in the CVS commit history in upstream CVS for ftpfs.c. Is the fix for this present elsewhere?
http://cvs.savannah.gnu.org/viewcvs/mc/vfs/utilvfs.c?root=mc&r1=1.42&r2=1.43
Indeed, mc from upstream cvs behaves as expected. Hopefully the fix will make it into a future update in FC, along with some more important fixes. Thanks Leonard.