Re: Bug in VFS

Hello, Ernesto!

> I want to report a bug in the VFS. I'm using MC to access an FTP server
> where I have a dir named "2002 - John Q". Here's how I see it from
> ncftp:
> ncftp /Peliculas > ls -l
> drwxr-xr-x   2 subidor  subidor         4096 Jul 19  2002 2002 - John Q
> But when using MC, I only see " - John Q".
> MC eats the "2002" part from the dir name.

I can reproduce this problem with the CVS version of MC.  The first part
of the filename is interpreted as year.  This bug is hard to fix - the
date parser in VFS is kludgy by design.

There are many different FTP servers, and they use different formats for
date.  The problem with FTP servers (and the FTP protocol) is that there
is no way to set the server to a particular locale.  So the code must

In your case there is a simple solution, because no part of the date 
should repeat.  We could add counters and work around it, but I doubt that 
it's worth the trouble.

But let's consider this string:

drwxr-xr-x 2 500 500 4096 Jul 19 17:01 2002 Q

Is "2002" a year or a part of the filename?  It may be either.  Some FTP
servers may print both the minutes and the year.  If we only restrict the
code to the servers that never print both the minutes and the year in the
same timestamp, then it will be impossible to use such servers at all from
mc.  I think it's a high price to pay for support for some bizarre

Date parsing needs more work, but I don't think it will happen soon until 
somebody produces a clean and well-documented patch.

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]