comparison lisp/net/tramp-smb.el @ 85694:21983e7c844a

* net/tramp.el (tramp-wrong-passwd-regexp): Tune regexp. (tramp-get-remote-tmpdir): New defun. (tramp-make-tramp-temp-file): Use it. (tramp-local-call-process): New defun. Replace all calls of `call-process' by this when appropriate. (tramp-handle-write-region): Replace calls of `file-attributes' by `tramp-compat-file-attributes'. (tramp-find-shell, tramp-open-connection-setup-interactive-shell): Make the first command a `tramp-send-command' call, with let-bind of `tramp-end-of-output'. (tramp-version, tramp-bug, tramp-reporter-dump-variable) (tramp-load-report-modules, tramp-append-tramp-buffers): Move to tramp-cmds.el. * net/tramp-fish.el (tramp-fish-handle-copy-file) (tramp-fish-do-copy-or-rename-file) (tramp-fish-do-copy-or-rename-file-directly): * net/tramp-smb.el (tramp-smb-handle-copy-file): Add parameter PRESERVE-UID-GID.
author Michael Albinus <michael.albinus@gmx.de>
date Sat, 27 Oct 2007 13:57:43 +0000
parents a42b8750a992
children 7f134b676a0c
comparison
equal deleted inserted replaced
85693:dbd6dad40424 85694:21983e7c844a
203 203
204 204
205 ;; File name primitives 205 ;; File name primitives
206 206
207 (defun tramp-smb-handle-copy-file 207 (defun tramp-smb-handle-copy-file
208 (filename newname &optional ok-if-already-exists keep-date) 208 (filename newname &optional ok-if-already-exists keep-date preserve-uid-gid)
209 "Like `copy-file' for Tramp files. 209 "Like `copy-file' for Tramp files.
210 KEEP-DATE is not handled in case NEWNAME resides on an SMB server." 210 KEEP-DATE is not handled in case NEWNAME resides on an SMB server.
211 PRESERVE-UID-GID is completely ignored."
211 (setq filename (expand-file-name filename) 212 (setq filename (expand-file-name filename)
212 newname (expand-file-name newname)) 213 newname (expand-file-name newname))
213 214
214 (let ((tmpfile (file-local-copy filename))) 215 (let ((tmpfile (file-local-copy filename)))
215 216
572 "Like `write-region' for Tramp files." 573 "Like `write-region' for Tramp files."
573 (setq filename (expand-file-name filename)) 574 (setq filename (expand-file-name filename))
574 (with-parsed-tramp-file-name filename nil 575 (with-parsed-tramp-file-name filename nil
575 (unless (eq append nil) 576 (unless (eq append nil)
576 (tramp-error 577 (tramp-error
577 v 'file-error "Cannot append to file using tramp (`%s')" filename)) 578 v 'file-error "Cannot append to file using Tramp (`%s')" filename))
578 ;; XEmacs takes a coding system as the seventh argument, not `confirm'. 579 ;; XEmacs takes a coding system as the seventh argument, not `confirm'.
579 (when (and (not (featurep 'xemacs)) 580 (when (and (not (featurep 'xemacs))
580 confirm (file-exists-p filename)) 581 confirm (file-exists-p filename))
581 (unless (y-or-n-p (format "File %s exists; overwrite anyway? " 582 (unless (y-or-n-p (format "File %s exists; overwrite anyway? "
582 filename)) 583 filename))