comparison lisp/ange-ftp.el @ 21026:e01ca278ca3e

(ange-ftp-call-chmod): Don't try to chmod file `--'.
author Richard M. Stallman <rms@gnu.org>
date Mon, 02 Mar 1998 22:21:46 +0000
parents 8af33d2de7b2
children df07331ebc84
comparison
equal deleted inserted replaced
21025:c70f0ae7a1a3 21026:e01ca278ca3e
4276 ;; Handle an attempt to run chmod on a remote file 4276 ;; Handle an attempt to run chmod on a remote file
4277 ;; by using the ftp chmod command. 4277 ;; by using the ftp chmod command.
4278 (defun ange-ftp-call-chmod (args) 4278 (defun ange-ftp-call-chmod (args)
4279 (if (< (length args) 2) 4279 (if (< (length args) 2)
4280 (error "ange-ftp-call-chmod: missing mode and/or filename: %s" args)) 4280 (error "ange-ftp-call-chmod: missing mode and/or filename: %s" args))
4281 (let ((mode (car args))) 4281 (let ((mode (car args))
4282 (rest (cdr args)))
4283 (if (equal "--" (car rest))
4284 (setq rest (cdr rest)))
4282 (mapcar 4285 (mapcar
4283 (function 4286 (function
4284 (lambda (file) 4287 (lambda (file)
4285 (setq file (expand-file-name file)) 4288 (setq file (expand-file-name file))
4286 (let ((parsed (ange-ftp-ftp-name file))) 4289 (let ((parsed (ange-ftp-ftp-name file)))
4295 abbr)))) 4298 abbr))))
4296 (or (car result) 4299 (or (car result)
4297 (call-process 4300 (call-process
4298 ange-ftp-remote-shell 4301 ange-ftp-remote-shell
4299 nil t nil host "chmod" mode name))))))) 4302 nil t nil host "chmod" mode name)))))))
4300 (cdr args))) 4303 rest))
4301 (setq ange-ftp-ls-cache-file nil) ;Stop confusing Dired. 4304 (setq ange-ftp-ls-cache-file nil) ;Stop confusing Dired.
4302 0) 4305 0)
4303 4306
4304 ;;; This is turned off because it has nothing properly to do 4307 ;;; This is turned off because it has nothing properly to do
4305 ;;; with dired. It could be reasonable to adapt this to 4308 ;;; with dired. It could be reasonable to adapt this to