changeset 14869:a9ba8d3ffd87

(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.
author Richard M. Stallman <rms@gnu.org>
date Sun, 24 Mar 1996 00:26:02 +0000
parents cca4562fbafd
children c51cef393dae
files lisp/ange-ftp.el
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ange-ftp.el	Sat Mar 23 15:46:14 1996 +0000
+++ b/lisp/ange-ftp.el	Sun Mar 24 00:26:02 1996 +0000
@@ -4089,10 +4089,16 @@
 	(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 @@
 						(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)