Ticket #2635 (closed defect: fixed)
[patch ready] [ftpfs] [regression] mc adds spaces at the beginning of all files/dirs on ftp servers
Reported by: | sergem | Owned by: | slavazanko |
---|---|---|---|
Priority: | major | Milestone: | 4.7 |
Component: | mc-vfs | Version: | 4.7.5.5 |
Keywords: | Cc: | t.artem@…, leadman@… | |
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master committed-stable |
Description
For FTP servers, that do not send ".." in directory listing, mc adds one space to the name of every file and directory. Attached patch should fix this problem.
Steps to reproduce:
cd /#ftp:ftp.symantec.com
Expected result:
Correct list of files/directories
Actual result:
Just open it and you'll see. :)
It was working before, but I'm too lazy to find exact version where it broke.
See also: #2634
Attachments
Change History
comment:1 Changed 13 years ago by slavazanko
- Owner set to slavazanko
- Status changed from new to accepted
comment:2 Changed 13 years ago by slavazanko
- Branch state changed from no branch to on review
- Milestone changed from Future Releases to 4.7
Created branch 2635_ftp_spaces (parent: 4.7.5-stable)
Initial changeset:387f00717ae62281ade6b732e5074ef2bbc168e3
Review, please.
comment:4 Changed 13 years ago by birdie
- Summary changed from [patch ready] [ftpfs] [regression] mc adds spaces an the beginning of all files/dirs at the ftp server to [patch ready] [ftpfs] [regression] mc adds spaces at the beginning of all files/dirs on ftp servers
comment:5 Changed 13 years ago by andrew_b
- Votes for changeset changed from slavazanko to slavazanko andrew_b
- Branch state changed from on review to approved
comment:6 follow-up: ↓ 8 Changed 13 years ago by birdie
I still have this issue in MC 4.8.0 - should I create a new bug report?
┌<─ /ftp://ftp.drweb.com ─────────.[^]>┐┌<─ /ftp://ftp.drweb.com ─────────.[^]>┐ │'n Name │ Size │Modify time ││'n Name │ Size │Modify time │ │/.. │UP--DIR│Oct 24 12:06││/.. │UP--DIR│Oct 24 12:06│ │/ pub │ 4096│Jun 9 2008││/ pub │ 4096│Jun 9 2008│ │ │ │ ││ │ │ │ │ │ │ ││ │ │ │ │ │ │ │ │ │ │ ┌───────── Error ─────────┐ │ │ │ │ │ │ │ │ │ │ │ │ │ Cannot change directory │ │ │ │ │ │ │ │ │ │ │ │ │ └─────────────────────────┘ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ │ │ │ ││ │ │ │ │ │ │ ││ │ │ │ │ │ │ ││ │ │ │ │ │ │ ││ │ │ │ │ │ │ ││ │ │ │ ├──────────────────────────────────────┤├──────────────────────────────────────┤ │/ pub ││/ pub │ └──────────────────────────────────────┘└──────────────────────────────────────┘ ftpfs: CWD failed.
comment:8 in reply to: ↑ 6 ; follow-up: ↓ 9 Changed 13 years ago by andrew_b
Replying to birdie:
I still have this issue in MC 4.8.0 - should I create a new bug report?
No. This fix will be cherry-picked to the master branch.
comment:10 in reply to: ↑ 9 Changed 13 years ago by angel_il
comment:11 Changed 13 years ago by slavazanko
- Status changed from accepted to testing
- Votes for changeset changed from slavazanko andrew_b to committed-master committed-stable
- Resolution set to fixed
- Branch state changed from approved to merged
Merged to stable
git log --pretty=oneline a39e855..93af7b9
93af7b98e3e9bce31c86077bdbcf607916b534c7
Rebased and merged to master
git log --pretty=oneline 8300244..95c553c
comment:13 follow-up: ↓ 14 Changed 12 years ago by leadman
- Status changed from closed to reopened
- Cc leadman@… added
- Version changed from 4.7.5.5 to 4.8.3
- Milestone changed from 4.7 to 4.8
- Keywords regression added
- Resolution fixed deleted
Hi all,
regression detected in version:
patben@esp-patben-lin:~$ mc -V
GNU Midnight Commander 4.8.3
Zbudowano za pomocą biblioteki GLib 2.32.1
Używanie biblioteki S-Lang z bazą danych terminfo
Z wbudowanym edytorem
Z domyślną obsługą podpowłoki
Z obsługą wykonywania działań w tle
Z obsługą myszy w xterm i konsoli Linux
Z obsługą zdarzeń X11
Z obsługą wielu języków
Z obsługą wielu stron kodowych
Wirtualne systemy plików: cpiofs, tarfs, sfs, extfs, ftpfs, fish
Typy danych: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
This bug occurs again when connecting to FTP servers on AIX 5.3.0.0 and 6.1.0.0. After initial connection the names of files or directories are preceded with "?":
Code highlighting:
┌<─ ftp://promak@zs701/ ───────.[^]>┐┌<─ ~ ──────────────────────────.[^]>┐ │'n Nazwa │Rozmiar│Czas modyfi││'n Nazwa │Rozmiar│Czas modyfi│ │/.. │NADRZĘD│29.05 15:24││/.thunderbird │ 4096│17.05 12:48│ │/etc │ 12288│ 8.06 17:23││/.tuxcmd │ 4096│21.05 11:55│ │/tmp │ 4096│ 8.06 17:45││/Backup │ 4096│18.05 14:24│ │?.profile │ 0│ 1.01.1970 ││/Beach H~errazza│ 4096│27.03 11:14│ │?.sh_history │ 0│ 1.01.1970 ││/Dev │ 4096│21.05 17:04│ │?.vi_history │ 0│ 1.01.1970 ││/Dokumenty │ 4096│17.05 12:48│ │?* │ 0│ 1.01.1970 ││/Muzyka │ 4096│17.05 12:50│ │?A │ 0│ 1.01.1970 ││/Obrazy │ 4096│29.05 15:12│ │?JP │ 0│ 1.01.1970 ││/Pobrane │ 4096│ 8.06 09:17│ │?M │ 0│ 1.01.1970 ││/Publiczny │ 4096│17.05 13:16│ │?MDM │ 0│ 1.01.1970 ││/Pulpit │ 4096│21.05 17:10│ │?N │ 0│ 1.01.1970 ││/Szablony │ 4096│17.05 11:26│ │?O │ 0│ 1.01.1970 ││/Ubuntu One │ 4096│18.05 12:14│ │?P │ 0│ 1.01.1970 ││/Wideo │ 4096│17.05 11:26│ │?PB │ 0│ 1.01.1970 ││/squirre~l-3.2.0│ 4096│25.05 19:39│ ├───────────────────────────────────┤├────────────────────────────────────┤ │NADRZĘD ││/squirrel-sql-3.2.0 │ └───────────────────────────────────┘└────────────────── 200G/296G (67%) ─┘
After refreshing view with Ctrl+R, the names are displayed with spaces in front of them, and I am unable to enter directories:
Code highlighting:
ftpfs: CWD się nie powiodło. ┐ │'n Nazwa │Rozmiar│Czas modyfi││'n Nazwa │Rozmiar│Czas modyfi│ │/.. │NADRZĘD│29.05 15:24││/.thunderbird │ 4096│17.05 12:48│ │/ admin │ 256│22.03.2011 ││/.tuxcmd │ 4096│21.05 11:55│ │/ appl │ 256│24.03.2011 ││/Backup │ 4096│18.05 14:24│ │/ audit │ a│ 4096│27.03 11:14│ │/ data1 │ ┌─────────── Błąd ───────────┐ │ 4096│21.05 17:04│ │/ data3 │ │ │ │ 4096│17.05 12:48│ │/ esa │ 4 │ Nie można zmienić katalogu │ │ 4096│17.05 12:50│ │/ lost+found │ │ │ │ 4096│29.05 15:12│ │/ lpp │ 12 └────────────────────────────┘ │ 4096│ 8.06 09:17│ │/ mnt │ │ 4096│17.05 13:16│ │/ opt │ 4096│22.03.2011 ││/Pulpit │ 4096│21.05 17:10│ │/ pconsole │ 256│22.03.2011 ││/Szablony │ 4096│17.05 11:26│ │/ sbin │ 256│22.03.2011 ││/Ubuntu One │ 4096│18.05 12:14│ │/ servis │ 256│22.03.2011 ││/Wideo │ 4096│17.05 11:26│ │/ tftpboot │ 256│22.03.2011 ││/squirre~l-3.2.0│ 4096│25.05 19:39│ ├───────────────────────────────────┤├────────────────────────────────────┤ │/ appl ││/squirrel-sql-3.2.0 │ └───────────────────────────────────┘└────────────────── 200G/296G (67%) ─┘
As a side note, similar behavior is observed with Krusader FTP client.
I am not sure if your customs/traditions allow new users to reopen tickets, but I will do it for sake of fixing this bug. I will also modify ticket to match mc version which has this behavior. If I did it wrong, please correct me.
Cheers, Patryk!
comment:14 in reply to: ↑ 13 ; follow-up: ↓ 16 Changed 12 years ago by birdie
Replying to leadman:
Please, post a plain text FTP listing (preferably as an attachment).
ftp yourserver.com Name: Password: cd somedirectory ls
comment:15 Changed 12 years ago by slavazanko
- Status changed from reopened to closed
- Keywords regression removed
- Version changed from 4.8.3 to 4.7.5.5
- Resolution set to fixed
- Milestone changed from 4.8 to 4.7
comment:16 in reply to: ↑ 14 Changed 12 years ago by leadman
/Replying to birdie:
With console everything looks fine:
ftp> pwd 257 "/" is current directory. ftp> ls 200 PORT command successful. 150 Opening data connection for /bin/ls. total 61440 drwxrwxr-t 2 informix informix 4096 Jun 11 09:56 INFORMIXTMP drwxr-xr-x 2 root system 4096 Mar 06 2007 TT_DB drwxr-xr-x 5 root system 256 Apr 09 2009 appl drwxr-x--- 2 root audit 256 Jul 06 2006 audit lrwxrwxrwx 1 bin bin 8 Mar 06 2007 bin -> /usr/bin -rw-r--r-- 1 root system 6013 Jun 06 21:49 bosinst.data drwxr-xr-x 7 root system 256 Jun 01 13:54 chroot -rw-r--r-- 1 root system 0 Mar 07 2007 configassist.log drwxr-xr-x 7 promak promak 256 Dec 03 2009 data1 drwx------ 7 promak promak 256 Jul 16 2007 data2 drwxrwxr-x 5 root system 12288 Jun 10 15:00 dev -rw-r--r-- 1 root system 1783 Oct 28 2007 dupa.cron drwxr-xr-x 30 root system 12288 Jun 11 09:33 etc drwxr-xr-x 48 bin bin 4096 Jan 25 10:17 home -rw-r--r-- 1 root system 13019 Jun 09 19:54 image.data drwxr-xr-x 2 root system 256 Mar 06 2007 install lrwxrwxrwx 1 bin bin 8 Mar 06 2007 lib -> /usr/lib drwx------ 2 root system 256 Mar 07 2007 lost+found drwxr-xr-x 155 bin bin 12288 Jun 07 22:18 lpp -rw------- 1 root system 22390 Feb 17 2010 mbox drwxr-xr-x 2 root system 256 Aug 21 2008 media drwxr-xr-x 2 bin bin 256 Jul 06 2006 mnt drwxr-xr-x 13 root system 4096 Sep 18 2009 opt dr-xr-xr-x 1 root system 0 Jun 11 10:03 proc drwxr-xr-x 3 bin bin 256 Sep 18 2009 sbin -rw-r--r-- 1 root system 30779424 Jun 11 08:39 smit.log -rw-r--r-- 1 root system 185634 Jun 11 08:39 smit.script -rw-r--r-- 1 root system 293907 Jun 11 08:39 smit.transaction drwxrwxr-x 2 root system 256 Mar 07 2007 tftpboot drwxrwxrwt 20 bin bin 12288 Jun 11 10:03 tmp lrwxrwxrwx 1 bin bin 5 Mar 06 2007 u -> /home lrwxrwxrwx 1 root system 21 Mar 06 2007 unix -> /usr/lib/boot/unix_64 drwxr-xr-x 44 bin bin 4096 Jun 07 22:18 usr drwxr-xr-x 27 bin bin 4096 Jun 07 22:18 var 226 Transfer complete. ftp>