emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/net ange-ftp.el


From: Michael Albinus
Subject: [Emacs-diffs] emacs/lisp/net ange-ftp.el
Date: Sun, 05 Apr 2009 17:49:47 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       09/04/05 17:49:47

Modified files:
        lisp/net       : ange-ftp.el 

Log message:
        * net/ange-ftp.el (ange-ftp-set-file-modes): New defun.  Change
        `ange-ftp' property of `set-file-modes' to
        `ange-ftp-set-file-modes'.
        (ange-ftp-call-chmod): Add error handling.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/net/ange-ftp.el?cvsroot=emacs&r1=1.105&r2=1.106

Patches:
Index: ange-ftp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/ange-ftp.el,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -b -r1.105 -r1.106
--- ange-ftp.el 24 Mar 2009 16:10:32 -0000      1.105
+++ ange-ftp.el 5 Apr 2009 17:49:47 -0000       1.106
@@ -4350,6 +4350,7 @@
 (put 'dired-compress-file 'ange-ftp 'ange-ftp-dired-compress-file)
 (put 'load 'ange-ftp 'ange-ftp-load)
 (put 'find-backup-file-name 'ange-ftp 'ange-ftp-find-backup-file-name)
+(put 'set-file-modes 'ange-ftp 'ange-ftp-set-file-modes)
 
 ;; Turn off truename processing to save time.
 ;; Treat each name as its own truename.
@@ -4358,7 +4359,6 @@
 ;; We must return non-nil in order to mask our inability to do the job.
 ;; Otherwise there are errors when applied to the target file during
 ;; copying from a (localhost) Tramp file.
-(put 'set-file-modes 'ange-ftp 'ignore)
 (put 'set-file-times 'ange-ftp 'ignore)
 
 ;; Turn off RCS/SCCS processing to save time.
@@ -4577,13 +4577,15 @@
                                                (format "doing chmod %s"
                                                        abbr))))
                (or (car result)
-                   (call-process
-                    remote-shell-program
-                    nil t nil host dired-chmod-program mode name))))))
+                  (ange-ftp-error
+                   host user (concat "CHMOD failed: " (cdr result))))))))
      rest))
   (setq ange-ftp-ls-cache-file nil)    ;Stop confusing Dired.
   0)
 
+(defun ange-ftp-set-file-modes (filename mode)
+  (ange-ftp-call-chmod (list (format "%o" mode) filename)))
+
 ;; This is turned off because it has nothing properly to do
 ;; with dired.  It could be reasonable to adapt this to
 ;; replace ange-ftp-copy-file.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]