[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67865: [PATCH] ange-ftp fails with tnftp client
From: |
Christophe Deleuze |
Subject: |
bug#67865: [PATCH] ange-ftp fails with tnftp client |
Date: |
Sun, 17 Dec 2023 14:56:57 +0100 |
User-agent: |
mu4e 1.11.7; emacs 30.0.50 |
* bug description
When used with the tnftp client (https://en.wikipedia.org/wiki/Tnftp),
ange-ftp fails when trying to enable passive mode.
* fix description
Passive mode is enabled by function ange-ftp-passive-mode:
(defun ange-ftp-passive-mode (proc on-or-off)
(if (string-match (concat "Passive mode " on-or-off)
(cdr (ange-ftp-raw-send-cmd
proc (concat "passive " on-or-off)
"Trying passive mode..." nil)))
(ange-ftp-message (concat "Trying passive mode..." on-or-off))
(error "Trying passive mode...failed")))
that expects to get a result string containing the string "Passive
mode on" (when on-or-off is "on"), however tnftp includes a colon in
its answer (extract from the buffer the ftp process is run in):
ftp> passive on
Passive mode: on; fallback to active mode: off.
I suggest slightly changing the regexp used in string-match to allow
for this colon, as shown below:
(defun ange-ftp-passive-mode (proc on-or-off)
(if (string-match (concat "Passive mode:? " on-or-off)
[...]
The attached patch does just that.
For information, in debian bookworm the ftp package has changed from
netkit-ftp to being a dummy transitional package for tnftp.
regards,
0001-ange-ftp-fix-passive-mode-result-string-for-tntfp-cl.patch
Description: patch
- bug#67865: [PATCH] ange-ftp fails with tnftp client,
Christophe Deleuze <=