(if (file-remote-p symlink-target)
(let (file-name-handler-alist)
(tramp-compat-file-name-quote symlink-target))
- symlink-target)
+ (expand-file-name
+ symlink-target (file-name-directory v2-localname)))
v2-localname)))))
(when (>= numchase numchase-limit)
(tramp-error
(should-error
(make-symbolic-link tmp-name1 tmp-name2)
:type 'file-already-exists)
- ;; number means interactive case.
+ ;; A number means interactive case.
(cl-letf (((symbol-function 'yes-or-no-p) 'ignore))
(should-error
(make-symbolic-link tmp-name1 tmp-name2 0)
(should
(string-equal (file-truename tmp-name1) (file-truename tmp-name2)))
(should (file-equal-p tmp-name1 tmp-name2))
+ ;; Check relative symlink file name.
+ (delete-file tmp-name2)
+ (let ((default-directory tramp-test-temporary-file-directory))
+ (make-symbolic-link (file-name-nondirectory tmp-name1) tmp-name2))
+ (should (file-symlink-p tmp-name2))
+ (should-not (string-equal tmp-name2 (file-truename tmp-name2)))
+ (should
+ (string-equal (file-truename tmp-name1) (file-truename tmp-name2)))
+ (should (file-equal-p tmp-name1 tmp-name2))
;; Symbolic links could look like a remote file name.
;; They must be quoted then.
(delete-file tmp-name2)