GNU bug report logs -
#43695
28.0.50; FTP tramp fails with some dired listing switches
Previous Next
Reported by: Jean Louis <bugs <at> gnu.support>
Date: Tue, 29 Sep 2020 06:48:01 UTC
Severity: minor
Tags: moreinfo, notabug
Found in version 28.0.50
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* Michael Albinus <michael.albinus <at> gmx.de> [2020-09-29 21:01]:
> Jean Louis <bugs <at> gnu.support> 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)
As I cannot implement your patch easily and directly, I would just
like to re-define the function, is it this one? Please send me your
function in complete, that I can try it out.
(defun ange-ftp-switches-ok (switches)
"Return SWITCHES (a string) if suitable for use with ls over ftp."
(and (stringp switches)
;; We allow the --almost-all switch, which lists all files
;; except "." and "..". This is OK because we manually
;; insert these entries in the hash table.
(string-match
"--\\(almost-\\)?all\\>\\|\\(\\`\\| \\)-[[:alpha:]]*[aA]"
switches)
;; Disallow other long flags except --(almost-)all.
(not (string-match "\\(\\`\\| \\)--\\w+"
(replace-regexp-in-string
"--\\(almost-\\)?all\\>" ""
switches)))
;; Must include 'l'.
(string-match "\\(\\`\\| \\)-[[:alpha:]]*l" switches)
;; Disallow recursive flag.
(not (string-match
"\\(\\`\\| \\)-[[:alpha:]]*R" switches))
switches))
This bug report was last modified 4 years and 187 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.