1944 |
(setq numchase (1+ numchase)) |
(setq numchase (1+ numchase)) |
1945 |
(when (file-name-absolute-p symlink-target) |
(when (file-name-absolute-p symlink-target) |
1946 |
(setq result nil)) |
(setq result nil)) |
1947 |
|
;; If the symlink was absolute, we'll get a string like |
1948 |
|
;; "/user@host:/some/target"; extract the |
1949 |
|
;; "/some/target" part from it. |
1950 |
|
(when (tramp-tramp-file-p symlink-target) |
1951 |
|
(with-parsed-tramp-file-name symlink-target 'sym |
1952 |
|
(unless (equal (list multi-method method user host) |
1953 |
|
(list sym-multi-method sym-method |
1954 |
|
sym-user sym-host)) |
1955 |
|
(error "Symlink target `%s' on wrong host" |
1956 |
|
symlink-target)) |
1957 |
|
(setq symlink-target localname))) |
1958 |
(setq steps |
(setq steps |
1959 |
(append (tramp-split-string symlink-target "/") steps))) |
(append (tramp-split-string symlink-target "/") steps))) |
1960 |
(t |
(t |
2332 |
"Like `file-symlink-p' for tramp files." |
"Like `file-symlink-p' for tramp files." |
2333 |
(with-parsed-tramp-file-name filename nil |
(with-parsed-tramp-file-name filename nil |
2334 |
(let ((x (car (tramp-handle-file-attributes filename)))) |
(let ((x (car (tramp-handle-file-attributes filename)))) |
2335 |
(when (stringp x) x)))) |
(when (stringp x) |
2336 |
|
;; When Tramp is running on VMS, then `file-name-absolute-p' |
2337 |
|
;; might do weird things. |
2338 |
|
(if (file-name-absolute-p x) |
2339 |
|
(tramp-make-tramp-file-name |
2340 |
|
multi-method method user host x) |
2341 |
|
x))))) |
2342 |
|
|
2343 |
(defun tramp-handle-file-writable-p (filename) |
(defun tramp-handle-file-writable-p (filename) |
2344 |
"Like `file-writable-p' for tramp files." |
"Like `file-writable-p' for tramp files." |