summaryrefslogtreecommitdiff
path: root/lisp/ange-ftp.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-03-24 00:26:02 +0000
committerRichard M. Stallman <rms@gnu.org>1996-03-24 00:26:02 +0000
commitd145a0c520585d15ab15fc0dd3f637ad7ed6454c (patch)
treebdb8a82ae8a6aad12929f0601d412eb8957241f3 /lisp/ange-ftp.el
parent7212dc72d8560ffd98090f157ead7d203c0d6b4f (diff)
downloademacs-d145a0c520585d15ab15fc0dd3f637ad7ed6454c.tar.gz
(ange-ftp-dired-call-process): Return 1 if error.
(ange-ftp-call-chmod): If ftp chmod cmd fails, try rsh. (ange-ftp-remote-shell): New variable.
Diffstat (limited to 'lisp/ange-ftp.el')
-rw-r--r--lisp/ange-ftp.el17
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el
index c230de0d581..1da75d4e3e3 100644
--- a/lisp/ange-ftp.el
+++ b/lisp/ange-ftp.el
@@ -4089,10 +4089,16 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
(ftp-error (insert (format "%s: %s, %s\n"
(nth 1 oops)
(nth 2 oops)
- (nth 3 oops))))
- (error (insert (format "%s\n" (nth 1 oops)))))
+ (nth 3 oops)))
+ ;; Caller expects nonzero value to mean failure.
+ 1)
+ (error (insert (format "%s\n" (nth 1 oops)))
+ 1))
(apply 'call-process program nil (not discard) nil arguments)))
+(defvar ange-ftp-remote-shell "rsh"
+ "Remote shell to use for chmod, if FTP server rejects the `chmod' command.")
+
;; Handle an attempt to run chmod on a remote file
;; by using the ftp chmod command.
(defun ange-ftp-call-chmod (args)
@@ -4114,10 +4120,9 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
(format "doing chmod %s"
abbr))))
(or (car result)
- (ange-ftp-error host user
- (format "chmod: %s: \"%s\""
- file
- (cdr result)))))))))
+ (call-process
+ ange-ftp-remote-shell
+ nil t nil host "chmod" mode name)))))))
(cdr args)))
(setq ange-ftp-ls-cache-file nil) ;Stop confusing Dired.
0)