* lisp/net/tramp.el (tramp-handle-unlock-file): Raise a warning
only when `create-lockfiles'.
* test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion):
Extend test.
;; Trigger the unlock error.
(signal 'file-error `("Cannot remove lock file for" ,file)))
;; `userlock--handle-unlock-error' exists since Emacs 28.1.
- (error (tramp-compat-funcall 'userlock--handle-unlock-error err))))
+ (error
+ (when create-lockfiles
+ (tramp-compat-funcall 'userlock--handle-unlock-error err)))))
(defun tramp-handle-load (file &optional noerror nomessage nosuffix must-suffix)
"Like `load' for Tramp files."
(should (equal (file-name-completion "foo" tmp-name) t))
(should (equal (file-name-completion "b" tmp-name) "bo"))
(should-not (file-name-completion "a" tmp-name))
+ ;; `file-name-completion' should not err out if
+ ;; directory does not exist. (Bug#61890)
+ (should-not
+ (file-name-completion
+ "a" (tramp-compat-file-name-concat tmp-name "fuzz")))
;; Ange-FTP does not support predicates.
(unless (tramp--test-ange-ftp-p)
(should