Bug 178440 - ftp directory listing gives parse error
Summary: ftp directory listing gives parse error
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: mc
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-01-20 16:38 UTC by Radek Bíba
Modified: 2013-07-02 23:13 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-27 21:46:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Radek Bíba 2006-01-20 16:38:32 UTC
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.

Comment 1 Leonard den Ottolander 2006-02-01 17:04:49 UTC
This is now fixed in CVS. We do not longer attempt to parse more than 3 date
elements.


Comment 2 Jindrich Novy 2006-02-02 17:00:54 UTC
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?

Comment 4 Radek Bíba 2006-02-28 14:32:13 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.