vfs bug



Hello!

There is a little bug in the ftpfs/vfs code.

If you browse an ftp server, and list a dir where some filename begins 
with 4 digit, they appear wrong in the list.

ncftp / > cd Kraftwerk/
ncftp /Kraftwerk > ls -l
drwxr-xr-x   4 1091     group          4096 dec 21 11:56 1970 Kraftwerk
drwxr-xr-x   4 1091     group          4096 dec 21 13:03 1972 Kraftwerk 2
drwxr-xr-x   4 1091     group          4096 dec 21 14:02 1973 Ralf & Florian
drwxr-xr-x   4 1091     group          4096 dec 21 15:08 1974 Autobahn 
drwxr-xr-x   4 1091     group          4096 dec 21 16:06 1975 Radio-Activity
drwxr-xr-x   4 1091     group          4096 dec 21 16:50 1977 Showroom Dummies
drwxr-xr-x   4 1091     group          4096 dec 21 17:56 1977 Trans Europa Express (German)
drwxr-xr-x   3 1091     group          4096 dec 22 03:07 Kraftwerk_-_THX_1138_(Autobahn_Cologne-Paris)_(2003)-WOS
drwxr-xr-x   4 1091     group          4096 dec 22 01:13 Kraftwerk-Tour_De_France_Soundtracks_TRACKFIXED-2003


Backtraced and found the bug here:

int vfs_parse_filedate (int idx, time_t *t) {
//..
/* This is a special case for ctime() or Mon DD YYYY hh:mm */
if (is_num (idx) && (columns[idx + 1][0])) {
    if (got_year) {
        if (is_time (columns[idx], &tim))
        idx++;  /* time also */
    } else {
        if ((got_year = is_year(columns[idx], &tim)))
        idx++;  /* year also */
    }
}
//..

I've made a workaround (comment out the else part), and now it works fine.

I hope you'll see what I mean, and sorry for my bad English.
If you reply to this letter, please Cc: me, because I'm not subscribed.


Best regards,
Szabolcs Horvath



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