diff options
| author | Michael Albinus | 2025-10-11 14:37:04 +0200 |
|---|---|---|
| committer | Michael Albinus | 2025-10-11 14:37:04 +0200 |
| commit | ba7e9579260e146d53d1fc039ff2035ff45fca75 (patch) | |
| tree | 7544db18e58341013ef0486f7dfd4e1b63681f59 /lisp | |
| parent | dcea973c04bc9f1078444dc1faf9491408832423 (diff) | |
| download | emacs-ba7e9579260e146d53d1fc039ff2035ff45fca75.tar.gz emacs-ba7e9579260e146d53d1fc039ff2035ff45fca75.zip | |
Make cascaded archives working in tramp-archive.el work, again
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Move bindings of `tramp-methods' and `tramp-gvfs-methods' up.
(tramp-archive-file-name-handler): Do not use
`tramp-archive-run-real-handler' for testing existence of
`archive'. (Bug#79582)
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test-file-archive-hexlified): Move down.
(tramp-archive-test-cascaded-file-archive)
(tramp-archive-test-cascaded-archive, tramp-archive-test-cascaded):
New defvars.
(tramp-archive--test-deftest-cascaded): New defmacro.
(tramp-archive-test01-file-name-syntax)
(tramp-archive-test05-expand-file-name): Adapt tests.
(tramp-archive-test01-file-name-syntax-cascaded)
(tramp-archive-test05-expand-file-name-cascaded)
(tramp-archive-test06-directory-file-name-cascaded)
(tramp-archive-test07-file-exists-p-cascaded)
(tramp-archive-test08-file-local-copy-cascaded)
(tramp-archive-test09-insert-file-contents-cascaded)
(tramp-archive-test11-copy-file-cascaded)
(tramp-archive-test15-copy-directory-cascaded)
(tramp-archive-test16-directory-files-cascaded)
(tramp-archive-test17-insert-directory-cascaded)
(tramp-archive-test18-file-attributes-cascaded)
(tramp-archive-test19-directory-files-and-attributes-cascaded)
(tramp-archive-test20-file-modes-cascaded)
(tramp-archive-test21-file-links-cascaded)
(tramp-archive-test26-file-name-completion-cascaded)
(tramp-archive-test40-make-nearby-temp-file-cascaded)
(tramp-archive-test43-file-system-info-cascaded)
(tramp-archive-test44-user-group-ids-cascaded): New tests.
* test/lisp/net/tramp-archive-resources/outer.zip: New test file.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/net/tramp-archive.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 3de909911b4..a52b8be6e09 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el | |||
| @@ -338,15 +338,16 @@ arguments to pass to the OPERATION." | |||
| 338 | (tramp-register-file-name-handlers) | 338 | (tramp-register-file-name-handlers) |
| 339 | (tramp-archive-run-real-handler operation args)) | 339 | (tramp-archive-run-real-handler operation args)) |
| 340 | 340 | ||
| 341 | (let* ((filename (apply #'tramp-archive-file-name-for-operation | 341 | (let* ((tramp-methods (cons `(,tramp-archive-method) tramp-methods)) |
| 342 | (tramp-gvfs-methods tramp-archive-all-gvfs-methods) | ||
| 343 | (filename (apply #'tramp-archive-file-name-for-operation | ||
| 342 | operation args)) | 344 | operation args)) |
| 343 | (archive (tramp-archive-file-name-archive filename))) | 345 | (archive (tramp-archive-file-name-archive filename))) |
| 344 | 346 | ||
| 345 | ;; `filename' could be a quoted file name. Or the file | 347 | ;; `filename' could be a quoted file name. Or the file |
| 346 | ;; archive could be a directory, see Bug#30293. | 348 | ;; archive could be a directory, see Bug#30293. |
| 347 | (if (or (null archive) | 349 | (if (or (null archive) |
| 348 | (not (tramp-archive-run-real-handler | 350 | (not (file-exists-p archive)) |
| 349 | #'file-exists-p (list archive))) | ||
| 350 | (tramp-archive-run-real-handler | 351 | (tramp-archive-run-real-handler |
| 351 | #'file-directory-p (list archive))) | 352 | #'file-directory-p (list archive))) |
| 352 | (tramp-archive-run-real-handler operation args) | 353 | (tramp-archive-run-real-handler operation args) |
| @@ -358,9 +359,7 @@ arguments to pass to the OPERATION." | |||
| 358 | (tramp-get-buffer (tramp-archive-dissect-file-name filename)) | 359 | (tramp-get-buffer (tramp-archive-dissect-file-name filename)) |
| 359 | (setq default-directory (file-name-as-directory archive))) | 360 | (setq default-directory (file-name-as-directory archive))) |
| 360 | ;; Now run the handler. | 361 | ;; Now run the handler. |
| 361 | (let ((tramp-methods (cons `(,tramp-archive-method) tramp-methods)) | 362 | (let (;; Set uid and gid. gvfsd-archive could do it, but it doesn't. |
| 362 | (tramp-gvfs-methods tramp-archive-all-gvfs-methods) | ||
| 363 | ;; Set uid and gid. gvfsd-archive could do it, but it doesn't. | ||
| 364 | (tramp-unknown-id-integer (user-uid)) | 363 | (tramp-unknown-id-integer (user-uid)) |
| 365 | (tramp-unknown-id-string (user-login-name)) | 364 | (tramp-unknown-id-string (user-login-name)) |
| 366 | (fn (assoc operation tramp-archive-file-name-handler-alist))) | 365 | (fn (assoc operation tramp-archive-file-name-handler-alist))) |