Subject: Re: bug#43695: 28.0.50; FTP tramp fails with some dired listing switches

From: Michael Albinus <[email-masked]>
Date: Tue, 29 Sep 2020 20:01:08 +0200

Jean Louis <[email-masked]> writes:

Hi Jean,

> So I think that my dired switches like "-gohl
> --group-directories-first" are disturbing the FTP.
>
> Maybe special switches shall be used for FTP and special for dired, so
> that such do not conflict.

ange-ftp has already a check for proper dired switches. Does the
appended patch fixes your problem?

> Jean

Best regards, Michael.

*** /tmp/ediffSNrsg5	2020-09-29 19:59:25.357750430 +0200
--- /home/albinus/src/emacs/lisp/net/ange-ftp.el	2020-09-29 19:59:09.169756302 +0200
***************
*** 2835,2840 ****
--- 2835,2843 ----
         ;; Disallow recursive flag.
         (not (string-match
               "\\(\\`\\| \\)-[[:alpha:]]*R" switches))
+        ;; Disallow do not list owner flag.  (Bug#43695)
+        (not (string-match
+              "\\(\\`\\| \\)-[[:alpha:]]*g" switches))
         switches))

  (defun ange-ftp-get-files (directory &optional no-error)