aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-03-24 00:26:02 +0000
committerRichard M. Stallman1996-03-24 00:26:02 +0000
commit621ca7a223232ba4af0f76cb4d49edc3cba40ad9 (patch)
treec1004296af4c01fc8a862979a4ab6ed9f2d24047
parent8c9c98ec53641b7397c3a3449d5ab37282956e56 (diff)
downloademacs-621ca7a223232ba4af0f76cb4d49edc3cba40ad9.tar.gz
emacs-621ca7a223232ba4af0f76cb4d49edc3cba40ad9.zip
(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.
-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.")
4089 (ftp-error (insert (format "%s: %s, %s\n" 4089 (ftp-error (insert (format "%s: %s, %s\n"
4090 (nth 1 oops) 4090 (nth 1 oops)
4091 (nth 2 oops) 4091 (nth 2 oops)
4092 (nth 3 oops)))) 4092 (nth 3 oops)))
4093 (error (insert (format "%s\n" (nth 1 oops))))) 4093 ;; Caller expects nonzero value to mean failure.
4094 1)
4095 (error (insert (format "%s\n" (nth 1 oops)))
4096 1))
4094 (apply 'call-process program nil (not discard) nil arguments))) 4097 (apply 'call-process program nil (not discard) nil arguments)))
4095 4098
4099(defvar ange-ftp-remote-shell "rsh"
4100 "Remote shell to use for chmod, if FTP server rejects the `chmod' command.")
4101
4096;; Handle an attempt to run chmod on a remote file 4102;; Handle an attempt to run chmod on a remote file
4097;; by using the ftp chmod command. 4103;; by using the ftp chmod command.
4098(defun ange-ftp-call-chmod (args) 4104(defun ange-ftp-call-chmod (args)
@@ -4114,10 +4120,9 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
4114 (format "doing chmod %s" 4120 (format "doing chmod %s"
4115 abbr)))) 4121 abbr))))
4116 (or (car result) 4122 (or (car result)
4117 (ange-ftp-error host user 4123 (call-process
4118 (format "chmod: %s: \"%s\"" 4124 ange-ftp-remote-shell
4119 file 4125 nil t nil host "chmod" mode name)))))))
4120 (cdr result)))))))))
4121 (cdr args))) 4126 (cdr args)))
4122 (setq ange-ftp-ls-cache-file nil) ;Stop confusing Dired. 4127 (setq ange-ftp-ls-cache-file nil) ;Stop confusing Dired.
4123 0) 4128 0)