summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-fuse.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2023-03-12 17:21:57 +0100
committerMichael Albinus <michael.albinus@gmx.de>2023-03-12 17:21:57 +0100
commitf5f13495f5dac4148c1da8b0ba18c22daf77bb04 (patch)
treedf1f722b4801b8f8fd4c8900ede8a04728f5beef /lisp/net/tramp-fuse.el
parente87431eda0a73c15865deb554cdb3ba13b7767f6 (diff)
downloademacs-f5f13495f5dac4148c1da8b0ba18c22daf77bb04.tar.gz
Make Tramp file name completion more quiet for all backends
* lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions): * lisp/net/tramp-archive.el (tramp-archive-handle-file-name-all-completions): * lisp/net/tramp-crypt.el (tramp-crypt-handle-file-name-all-completions): * lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions): * lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions): * lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-name-all-completions): Return nil when DIRECTORY is missing. (Bug#61890)
Diffstat (limited to 'lisp/net/tramp-fuse.el')
-rw-r--r--lisp/net/tramp-fuse.el29
1 files changed, 15 insertions, 14 deletions
diff --git a/lisp/net/tramp-fuse.el b/lisp/net/tramp-fuse.el
index b846caadc18..8112e564a2c 100644
--- a/lisp/net/tramp-fuse.el
+++ b/lisp/net/tramp-fuse.el
@@ -98,20 +98,21 @@
(defun tramp-fuse-handle-file-name-all-completions (filename directory)
"Like `file-name-all-completions' for Tramp files."
(tramp-fuse-remove-hidden-files
- (all-completions
- filename
- (delete-dups
- (append
- (file-name-all-completions
- filename (tramp-fuse-local-file-name directory))
- ;; Some storage systems do not return "." and "..".
- (let (result)
- (dolist (item '(".." ".") result)
- (when (string-prefix-p filename item)
- (catch 'match
- (dolist (elt completion-regexp-list)
- (unless (string-match-p elt item) (throw 'match nil)))
- (setq result (cons (concat item "/") result)))))))))))
+ (ignore-error file-missing
+ (all-completions
+ filename
+ (delete-dups
+ (append
+ (file-name-all-completions
+ filename (tramp-fuse-local-file-name directory))
+ ;; Some storage systems do not return "." and "..".
+ (let (result)
+ (dolist (item '(".." ".") result)
+ (when (string-prefix-p filename item)
+ (catch 'match
+ (dolist (elt completion-regexp-list)
+ (unless (string-match-p elt item) (throw 'match nil)))
+ (setq result (cons (concat item "/") result))))))))))))
;; This function isn't used.
(defun tramp-fuse-handle-insert-directory