emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Michael Albinus
Subject: [Emacs-diffs] emacs/lisp/net tramp-fish.el
Date: Thu, 01 Oct 2009 15:35:36 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       09/10/01 15:35:36

Modified files:
        lisp/net       : tramp-fish.el 

Log message:
        * net/tramp-fish.el (tramp-fish-handle-delete-directory): Handle
        optional parameter RECURSIVE.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/net/tramp-fish.el?cvsroot=emacs&r1=1.21&r2=1.22

Patches:
Index: tramp-fish.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp-fish.el,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- tramp-fish.el       22 Jun 2009 21:07:52 -0000      1.21
+++ tramp-fish.el       1 Oct 2009 15:35:35 -0000       1.22
@@ -312,9 +312,18 @@
   (tramp-fish-do-copy-or-rename-file
    'copy filename newname ok-if-already-exists keep-date preserve-uid-gid))
 
-(defun tramp-fish-handle-delete-directory (directory)
+(defun tramp-fish-handle-delete-directory (directory &optional recursive)
   "Like `delete-directory' for Tramp files."
   (when (file-exists-p directory)
+    (if recursive
+       (mapc
+        (lambda (file)
+          (if (file-directory-p file)
+              (delete-directory file recursive)
+            (delete-file file)))
+        ;; We do not want to delete "." and "..".
+        (directory-files
+         directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")))
     (with-parsed-tramp-file-name
        (directory-file-name (expand-file-name directory)) nil
       (tramp-flush-directory-property v localname)




reply via email to

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