diff options
| author | Michael Albinus | 2009-10-01 15:40:59 +0000 |
|---|---|---|
| committer | Michael Albinus | 2009-10-01 15:40:59 +0000 |
| commit | cc3dda16b935c45d482bb3a9797c70627ab17696 (patch) | |
| tree | f02a083752f58e12920333782bbbe1be8a47bbe1 | |
| parent | 93776a8c4a41889218bba1e270504590f303a1d4 (diff) | |
| download | emacs-cc3dda16b935c45d482bb3a9797c70627ab17696.tar.gz emacs-cc3dda16b935c45d482bb3a9797c70627ab17696.zip | |
* net/tramp-smb.el (tramp-smb-errors): Add error message for
connection timeout.
(tramp-smb-handle-delete-directory): Handle optional parameter
RECURSIVE.
| -rw-r--r-- | lisp/ChangeLog | 29 | ||||
| -rw-r--r-- | lisp/net/tramp-smb.el | 12 |
2 files changed, 40 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9e87539ab69..3bfd9c70ff4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,32 @@ | |||
| 1 | 2009-10-01 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * files.el (delete-directory): New defun. The original function | ||
| 4 | in fileio.c has been renamed to `delete-directory-internal'. | ||
| 5 | |||
| 6 | * dired.el (dired-delete-file): Call `delete-directory' with | ||
| 7 | RECURSIVE parameter. | ||
| 8 | |||
| 9 | * net/ange-ftp.el (ange-ftp-delete-directory ): Add optional | ||
| 10 | parameter RECURSIVE. Implementation is missing. | ||
| 11 | |||
| 12 | * net/tramp.el (tramp-handle-make-directory): Flush upper | ||
| 13 | directory's file properties. | ||
| 14 | (tramp-handle-delete-directory): Handle optional parameter | ||
| 15 | RECURSIVE. | ||
| 16 | (tramp-handle-dired-recursive-delete-directory): Flush directory | ||
| 17 | properties after the remove command only. | ||
| 18 | |||
| 19 | * net/tramp-fish.el (tramp-fish-handle-delete-directory): Handle | ||
| 20 | optional parameter RECURSIVE. | ||
| 21 | |||
| 22 | * net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory): Handle | ||
| 23 | optional parameter RECURSIVE. | ||
| 24 | |||
| 25 | * net/tramp-smb.el (tramp-smb-errors): Add error message for | ||
| 26 | connection timeout. | ||
| 27 | (tramp-smb-handle-delete-directory): Handle optional parameter | ||
| 28 | RECURSIVE. | ||
| 29 | |||
| 1 | 2009-10-01 Stefan Monnier <monnier@iro.umontreal.ca> | 30 | 2009-10-01 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 31 | ||
| 3 | * emacs-lisp/bytecomp.el (byte-compile-defmacro-declaration): New fun. | 32 | * emacs-lisp/bytecomp.el (byte-compile-defmacro-declaration): New fun. |
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 549001db75a..54835efe226 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el | |||
| @@ -87,6 +87,7 @@ | |||
| 87 | "NT_STATUS_ACCOUNT_LOCKED_OUT" | 87 | "NT_STATUS_ACCOUNT_LOCKED_OUT" |
| 88 | "NT_STATUS_BAD_NETWORK_NAME" | 88 | "NT_STATUS_BAD_NETWORK_NAME" |
| 89 | "NT_STATUS_CANNOT_DELETE" | 89 | "NT_STATUS_CANNOT_DELETE" |
| 90 | "NT_STATUS_CONNECTION_REFUSED" | ||
| 90 | "NT_STATUS_DIRECTORY_NOT_EMPTY" | 91 | "NT_STATUS_DIRECTORY_NOT_EMPTY" |
| 91 | "NT_STATUS_DUPLICATE_NAME" | 92 | "NT_STATUS_DUPLICATE_NAME" |
| 92 | "NT_STATUS_FILE_IS_A_DIRECTORY" | 93 | "NT_STATUS_FILE_IS_A_DIRECTORY" |
| @@ -248,10 +249,19 @@ PRESERVE-UID-GID is completely ignored." | |||
| 248 | v 0 "Copying file %s to file %s...done" filename newname) | 249 | v 0 "Copying file %s to file %s...done" filename newname) |
| 249 | (tramp-error v 'file-error "Cannot copy `%s'" filename))))))) | 250 | (tramp-error v 'file-error "Cannot copy `%s'" filename))))))) |
| 250 | 251 | ||
| 251 | (defun tramp-smb-handle-delete-directory (directory) | 252 | (defun tramp-smb-handle-delete-directory (directory &optional recursive) |
| 252 | "Like `delete-directory' for Tramp files." | 253 | "Like `delete-directory' for Tramp files." |
| 253 | (setq directory (directory-file-name (expand-file-name directory))) | 254 | (setq directory (directory-file-name (expand-file-name directory))) |
| 254 | (when (file-exists-p directory) | 255 | (when (file-exists-p directory) |
| 256 | (if recursive | ||
| 257 | (mapc | ||
| 258 | (lambda (file) | ||
| 259 | (if (file-directory-p file) | ||
| 260 | (delete-directory file recursive) | ||
| 261 | (delete-file file))) | ||
| 262 | ;; We do not want to delete "." and "..". | ||
| 263 | (directory-files | ||
| 264 | directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"))) | ||
| 255 | (with-parsed-tramp-file-name directory nil | 265 | (with-parsed-tramp-file-name directory nil |
| 256 | ;; We must also flush the cache of the directory, because | 266 | ;; We must also flush the cache of the directory, because |
| 257 | ;; file-attributes reads the values from there. | 267 | ;; file-attributes reads the values from there. |