emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp/net tramp.el


From: Michael Albinus
Subject: [Emacs-diffs] emacs/lisp/net tramp.el
Date: Tue, 14 Apr 2009 14:36:39 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       09/04/14 14:36:39

Modified files:
        lisp/net       : tramp.el 

Log message:
        * net/tramp.el (tramp-handle-dired-recursive-delete-directory):
        Fix an error in flushing cache data.
        (tramp-handle-process-file): Flush all file cache values for the
        connection, because the remote process could have changed them.
        Suggested by Stefan Monnier <address@hidden>.
        Handle QUIT.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/net/tramp.el?cvsroot=emacs&r1=1.232&r2=1.233

Patches:
Index: tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -b -r1.232 -r1.233
--- tramp.el    12 Apr 2009 19:26:06 -0000      1.232
+++ tramp.el    14 Apr 2009 14:36:38 -0000      1.233
@@ -3468,9 +3468,9 @@
   "Recursively delete the directory given.
 This is like `dired-recursive-delete-directory' for Tramp files."
   (with-parsed-tramp-file-name filename nil
-    (tramp-flush-directory-property v filename)
+    (tramp-flush-directory-property v localname)
     ;; Run a shell command 'rm -r <localname>'
-    ;; Code shamelessly stolen for the dired implementation and, um, hacked :)
+    ;; Code shamelessly stolen from the dired implementation and, um, hacked :)
     (unless (file-exists-p filename)
       (tramp-error v 'file-error "No such directory: %s" filename))
     ;; Which is better, -r or -R? (-r works for me <address@hidden>)
@@ -3896,7 +3896,12 @@
                (with-current-buffer outbuf
                  (insert output-string)))
              (when display (display-buffer outbuf))))
-       ;; When the user did interrupt, we should do it also.
+       ;; When the user did interrupt, we should do it also.  We use
+       ;; return code -1 as marker.
+       (quit
+        (kill-buffer (tramp-get-connection-buffer v))
+        (setq ret -1))
+       ;; Handle errors.
        (error
         (kill-buffer (tramp-get-connection-buffer v))
         (setq ret 1)))
@@ -3905,10 +3910,14 @@
       (unless ret (setq ret (tramp-send-command-and-check v nil)))
       ;; Provide error file.
       (when tmpstderr (rename-file tmpstderr (cadr destination) t))
-      ;; Cleanup.
+      ;; Cleanup.  We remove all file cache values for the connection,
+      ;; because the remote process could have changed them.
       (when tmpinput (delete-file tmpinput))
+      (tramp-flush-directory-property v "")
       ;; Return exit status.
-      ret)))
+      (if (equal ret -1)
+         (keyboard-quit)
+       ret))))
 
 (defun tramp-local-call-process
   (program &optional infile destination display &rest args)




reply via email to

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