From: Richard M. Stallman Date: Sun, 24 Mar 1996 00:26:02 +0000 (+0000) Subject: (ange-ftp-dired-call-process): Return 1 if error. X-Git-Tag: emacs-19.34~991 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=621ca7a223232ba4af0f76cb4d49edc3cba40ad9;p=emacs.git (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. --- 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)