]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/ange-ftp.el (ange-ftp-delete-directory ): Add optional
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 1 Oct 2009 15:33:44 +0000 (15:33 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 1 Oct 2009 15:33:44 +0000 (15:33 +0000)
parameter RECURSIVE.  Implementation is missing.

lisp/net/ange-ftp.el

index fd7b83900d4b5cddfc38450da987e35e2edfe15c..72c6c032bbea98adb023e85aa473cb7ef5128075 100644 (file)
@@ -4064,7 +4064,7 @@ directory, so that Emacs will know its current contents."
            (ange-ftp-add-file-entry dir t))
        (ange-ftp-real-make-directory dir)))))
 
-(defun ange-ftp-delete-directory (dir)
+(defun ange-ftp-delete-directory (dir &optional recursive)
   (if (file-directory-p dir)
       (let ((parsed (ange-ftp-ftp-name dir)))
        (if parsed
@@ -4083,6 +4083,7 @@ directory, so that Emacs will know its current contents."
                            (ange-ftp-real-file-name-as-directory
                             (nth 2 parsed)))))
                   (abbr (ange-ftp-abbreviate-filename dir))
+                  ;; TODO: handle RECURSIVE.
                   (result (ange-ftp-send-cmd host user
                                              (list 'rmdir name)
                                              (format "Removing directory %s"
@@ -4093,7 +4094,7 @@ directory, so that Emacs will know its current contents."
                                          dir
                                          (cdr result))))
              (ange-ftp-delete-file-entry dir t))
-         (ange-ftp-real-delete-directory dir)))
+         (ange-ftp-real-delete-directory dir recursive)))
     (error "Not a directory: %s" dir)))
 \f
 ;; Make a local copy of FILE and return its name.