emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/net/tramp-smb.el,v


From: Michael Albinus
Subject: [Emacs-diffs] Changes to emacs/lisp/net/tramp-smb.el,v
Date: Wed, 07 Nov 2007 20:41:17 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       07/11/07 20:41:15

Index: net/tramp-smb.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp-smb.el,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- net/tramp-smb.el    27 Oct 2007 13:57:43 -0000      1.35
+++ net/tramp-smb.el    7 Nov 2007 20:41:15 -0000       1.36
@@ -563,7 +563,14 @@
 
 (defun tramp-smb-handle-substitute-in-file-name (filename)
   "Like `handle-substitute-in-file-name' for Tramp files.
-Catches errors for shares like \"C$/\", which are common in Microsoft Windows."
+\"//\" substitutes only in the local filename part.  Catches
+errors for shares like \"C$/\", which are common in Microsoft Windows."
+  (with-parsed-tramp-file-name filename nil
+    ;; Ignore in LOCALNAME everything before "//".
+    (when (and (stringp localname) (string-match ".+?/\\(/\\|~\\)" localname))
+      (setq filename
+           (concat (file-remote-p filename)
+                   (replace-match "\\1" nil nil localname)))))
   (condition-case nil
       (tramp-run-real-handler 'substitute-in-file-name (list filename))
     (error filename)))
@@ -583,7 +590,7 @@
                                filename))
        (tramp-error v 'file-error "File not overwritten")))
     ;; We must also flush the cache of the directory, because
-    ;; file-attributes reads the values from there.
+    ;; `file-attributes' reads the values from there.
     (tramp-flush-file-property v (file-name-directory localname))
     (tramp-flush-file-property v localname)
     (let ((file (tramp-smb-get-localname localname t))
@@ -1005,8 +1012,6 @@
 ;; * Return more comprehensive file permission string.  Think whether it is
 ;;   possible to implement `set-file-modes'.
 ;; * Handle links (FILENAME.LNK).
-;; * Maybe local tmp files should have the same extension like the original
-;;   files.  Strange behaviour with jka-compr otherwise?
 ;; * Try to remove the inclusion of dummy "" directory.  Seems to be at
 ;;   several places, especially in `tramp-smb-handle-insert-directory'.
 ;; * (RMS) Use unwind-protect to clean up the state so as to make the state




reply via email to

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