[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/net/tramp.el
From: |
Kai Großjohann |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/net/tramp.el |
Date: |
Thu, 11 Jul 2002 16:26:19 -0400 |
Index: emacs/lisp/net/tramp.el
diff -c emacs/lisp/net/tramp.el:1.8 emacs/lisp/net/tramp.el:1.9
*** emacs/lisp/net/tramp.el:1.8 Thu Jul 11 15:59:07 2002
--- emacs/lisp/net/tramp.el Thu Jul 11 16:26:19 2002
***************
*** 1507,1520 ****
;;; File Name Handler Functions:
- ;; The following file name handler ops are not implemented (yet?).
-
(defun tramp-handle-make-symbolic-link
(filename linkname &optional ok-if-already-exists)
"Like `make-symbolic-link' for tramp files.
! The LINKNAME argument should look like \"/path/to/target\" or
! \"relative-name\",and not like a Tramp filename."
! (error "Not implemented yet")
(with-parsed-tramp-file-name linkname l
(when (tramp-ange-ftp-file-name-p l-multi-method l-method)
(tramp-invoke-ange-ftp 'make-symbolic-link
--- 1507,1523 ----
;;; File Name Handler Functions:
(defun tramp-handle-make-symbolic-link
(filename linkname &optional ok-if-already-exists)
"Like `make-symbolic-link' for tramp files.
! If LINKNAME is a non-Tramp file, it is used verbatim as the target of
! the symlink. If LINKNAME is a Tramp file, only the path component is
! used as the target of the symlink.
!
! If LINKNAME is a Tramp file and the path component is relative, then
! it is expanded first, before the path component is taken. Note that
! this can give surprising results if the user/host for the source and
! target of the symlink differ."
(with-parsed-tramp-file-name linkname l
(when (tramp-ange-ftp-file-name-p l-multi-method l-method)
(tramp-invoke-ange-ftp 'make-symbolic-link
***************
*** 1527,1534 ****
"ln(1) does not exist on the remote host.")))
;; Do the 'confirm if exists' thing.
! (when (file-exists-p (expand-file-name filename
! CCC))
;; What to do?
(if (or (null ok-if-already-exists) ; not allowed to exist
(and (numberp ok-if-already-exists)
--- 1530,1536 ----
"ln(1) does not exist on the remote host.")))
;; Do the 'confirm if exists' thing.
! (when (file-exists-p linkname)
;; What to do?
(if (or (null ok-if-already-exists) ; not allowed to exist
(and (numberp ok-if-already-exists)
***************
*** 1536,1542 ****
(format
"File %s already exists; make it a link anyway? "
l-path)))))
! (signal 'file-already-exists (list "File already exists" l-path))))
;; Right, they are on the same host, regardless of user, method, etc.
;; We now make the link on the remote machine. This will occur as the
user
--- 1538,1551 ----
(format
"File %s already exists; make it a link anyway? "
l-path)))))
! (signal 'file-already-exists (list "File already exists" l-path))
! (delete-file linkname)))
!
! ;; If FILENAME is a Tramp name, use just the path component.
! (when (tramp-tramp-file-p filename)
! (setq filename (tramp-file-name-path
! (tramp-dissect-file-name
! (expand-file-name filename)))))
;; Right, they are on the same host, regardless of user, method, etc.
;; We now make the link on the remote machine. This will occur as the
user
***************
*** 1546,1553 ****
l-multi-method l-method l-user l-host
(format "cd %s && %s -sf %s %s"
cwd ln
! l-path
! filename)
t)))))
--- 1555,1562 ----
l-multi-method l-method l-user l-host
(format "cd %s && %s -sf %s %s"
cwd ln
! filename
! l-path)
t)))))
- [Emacs-diffs] Changes to emacs/lisp/net/tramp.el, Juanma Barranquero, 2002/07/03
- [Emacs-diffs] Changes to emacs/lisp/net/tramp.el, Andreas Schwab, 2002/07/03
- [Emacs-diffs] Changes to emacs/lisp/net/tramp.el, Kai Großjohann, 2002/07/11
- [Emacs-diffs] Changes to emacs/lisp/net/tramp.el,
Kai Großjohann <=
- [Emacs-diffs] Changes to emacs/lisp/net/tramp.el, Kai Großjohann, 2002/07/13
- [Emacs-diffs] Changes to emacs/lisp/net/tramp.el, Kai Großjohann, 2002/07/21
- [Emacs-diffs] Changes to emacs/lisp/net/tramp.el, Kai Großjohann, 2002/07/30