]> git.eshelyaron.com Git - emacs.git/commitdiff
Tramp cleanup
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 2 Mar 2023 12:54:14 +0000 (13:54 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 2 Mar 2023 12:54:14 +0000 (13:54 +0100)
* 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.

lisp/net/tramp.el
test/lisp/net/tramp-tests.el

index 1b434a726a1297f4dd4bd8a07ffbd540c93f8d20..47173b95beaa233075e0691a4e96f49854b753f3 100644 (file)
@@ -4791,7 +4791,9 @@ Do not set it manually, it is used buffer-local in `tramp-get-lock-pid'.")
        ;; 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."
index 948bf0ab9e2c279edcbb10668fd21d331f30f9ae..b6ad2e2f219b10d5e22cb104991390e256176f56 100644 (file)
@@ -4590,6 +4590,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
              (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