Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch ready] [ftpfs] [regression] mc adds spaces at the beginning of all files/dirs on ftp servers #2635

Closed
mc-butler opened this issue Oct 19, 2011 · 18 comments
Assignees
Labels
area: vfs Virtual File System support prio: medium Has the potential to affect progress ver: 4.7.5.5 Reproducible in version 4.7.5.5
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/2635
Reporter sergem
Mentions t.artem@….com, leadman@….onet.pl

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

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by sergem on Oct 19, 2011 at 23:02 UTC

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Oct 20, 2011 at 10:15 UTC (comment 1)

  • Status changed from new to accepted
  • Owner set to slavazanko

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Oct 20, 2011 at 11:30 UTC (comment 2)

  • 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 [387f00717ae62281ade6b732e5074ef2bbc168e3]

Review, please.

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Oct 20, 2011 at 11:30 UTC (comment 3)

  • Votes set to slavazanko

@mc-butler
Copy link
Author

Changed by birdie (aros@….com) on Oct 20, 2011 at 20:20 UTC (comment 4)

  • 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

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 22, 2011 at 9:43 UTC (comment 5)

  • Branch state changed from on review to approved
  • Votes changed from slavazanko to slavazanko andrew_b

@mc-butler
Copy link
Author

Changed by birdie (aros@….com) on Oct 24, 2011 at 7:53 UTC (comment 6)

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 ─────────.[^]>┐┌<─ /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.

@mc-butler
Copy link
Author

Changed by birdie (aros@….com) on Oct 24, 2011 at 7:54 UTC (comment 7)

  • Cc set to t.artem@….com

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 24, 2011 at 8:00 UTC (comment 6.8)

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.

@mc-butler
Copy link
Author

Changed by birdie (aros@….com) on Oct 24, 2011 at 8:03 UTC (comment 8.9)

Replying to 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.

OK, where can I download a patch for 4.8.0?

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Oct 24, 2011 at 8:24 UTC (comment 9.10)

Replying to birdie:

Replying to 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.

OK, where can I download a patch for 4.8.0?

try https://www.midnight-commander.org/changeset/387f00717ae62281ade6b732e5074ef2bbc168e3?format=diff&new=387f00717ae62281ade6b732e5074ef2bbc168e3

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Oct 24, 2011 at 18:20 UTC (comment 11)

  • Branch state changed from approved to merged
  • Status changed from accepted to testing
  • Resolution set to fixed
  • Votes changed from slavazanko andrew_b to committed-master committed-stable

Merged to stable

git log --pretty=oneline a39e855..93af7b9

[93af7b9]

Rebased and merged to master

git log --pretty=oneline 8300244..95c553c

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Oct 24, 2011 at 18:21 UTC (comment 12)

  • Status changed from testing to closed

@mc-butler
Copy link
Author

Changed by leadman (leadman@….onet.pl) on Jun 8, 2012 at 15:58 UTC (comment 13)

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Keywords set to regression
  • Cc changed from t.artem@….com to t.artem@….com, leadman@….onet.pl
  • Milestone changed from 4.7 to 4.8
  • Version changed from 4.7.5.5 to 4.8.3

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:
  {{{#!python
┌<─ 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:
  {{{#!python
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!

@mc-butler
Copy link
Author

Changed by birdie (aros@….com) on Jun 8, 2012 at 16:10 UTC (comment 13.14)

Replying to leadman:

Please, post a plain text FTP listing (preferably as an attachment).

ftp yourserver.com
Name:
Password:
cd somedirectory
ls

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Jun 8, 2012 at 20:18 UTC (comment 15)

  • Resolution set to fixed
  • Status changed from reopened to closed
  • Milestone changed from 4.8 to 4.7
  • Version changed from 4.8.3 to 4.7.5.5
  • Keywords regression deleted

Newly described bug isn't related to the leading spaces in filenames.

See #2816, #2800, #2790 for details and try to compile from latest 'master' branch.

If you see that this bug still present in master, please create new ticket with link to this ticket.

@mc-butler
Copy link
Author

Changed by leadman (leadman@….onet.pl) on Jun 11, 2012 at 8:05 UTC (comment 14.16)

/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> 

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Feb 21, 2025 at 7:53 UTC (comment 17)

Ticket #2680 has been marked as a duplicate of this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: vfs Virtual File System support prio: medium Has the potential to affect progress ver: 4.7.5.5 Reproducible in version 4.7.5.5
Development

No branches or pull requests

2 participants