[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp/net tramp-smb.el
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] emacs/lisp/net tramp-smb.el |
Date: |
Mon, 22 Jun 2009 21:08:29 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Michael Albinus <albinus> 09/06/22 21:08:29
Modified files:
lisp/net : tramp-smb.el
Log message:
* net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add
handler for `dired-uncache'.
(tramp-smb-handle-file-local-copy): Cleanup in case of error.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/net/tramp-smb.el?cvsroot=emacs&r1=1.47&r2=1.48
Patches:
Index: tramp-smb.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp-smb.el,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- tramp-smb.el 6 Jan 2009 07:52:01 -0000 1.47
+++ tramp-smb.el 22 Jun 2009 21:08:29 -0000 1.48
@@ -139,7 +139,7 @@
(directory-files-and-attributes .
tramp-smb-handle-directory-files-and-attributes)
(dired-call-process . ignore)
(dired-compress-file . ignore)
- ;; `dired-uncache' performed by default handler
+ (dired-uncache . tramp-handle-dired-uncache)
;; `expand-file-name' not necessary because we cannot expand "~/"
(file-accessible-directory-p . tramp-smb-handle-file-directory-p)
(file-attributes . tramp-smb-handle-file-attributes)
@@ -375,16 +375,18 @@
(defun tramp-smb-handle-file-local-copy (filename)
"Like `file-local-copy' for Tramp files."
(with-parsed-tramp-file-name filename nil
- (let ((file (tramp-smb-get-localname localname t))
- (tmpfile (tramp-compat-make-temp-file filename)))
(unless (file-exists-p filename)
(tramp-error
v 'file-error
"Cannot make local copy of non-existing file `%s'" filename))
+ (let ((file (tramp-smb-get-localname localname t))
+ (tmpfile (tramp-compat-make-temp-file filename)))
(tramp-message v 4 "Fetching %s to tmp file %s..." filename tmpfile)
(if (tramp-smb-send-command v (format "get \"%s\" %s" file tmpfile))
(tramp-message
v 4 "Fetching %s to tmp file %s...done" filename tmpfile)
+ ;; Oops, an error. We shall cleanup.
+ (delete-file tmpfile)
(tramp-error
v 'file-error
"Cannot make local copy of file `%s'" filename))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp/net tramp-smb.el,
Michael Albinus <=