]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug#70900
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 13 May 2024 07:23:58 +0000 (09:23 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 13 May 2024 08:39:05 +0000 (10:39 +0200)
* lisp/net/tramp.el (tramp-handle-unlock-file): Be quiet if user
isn't interested in lock files.  Bug#70900

(cherry picked from commit af526f88562162ec053534eae510b9e7a85cb9eb)

lisp/net/tramp.el

index 6cfc2f722d44ca80b77ed49f9dc8a192384bd585..182de2ac15d994ed3faeac2e855946cad70e68b0 100644 (file)
@@ -4650,8 +4650,11 @@ Do not set it manually, it is used buffer-local in `tramp-get-lock-pid'.")
               ((process-live-p (tramp-get-process v)))
               (lockname (tramp-compat-make-lock-file-name file)))
           (delete-file lockname)
-       ;; Trigger the unlock error.
-       (signal 'file-error `("Cannot remove lock file for" ,file)))
+       ;; Trigger the unlock error.  Be quiet if user isn't
+       ;; interested in lock files.  See Bug#70900.
+       (unless (or (not create-lockfiles)
+                   (bound-and-true-p remote-file-name-inhibit-locks))
+         (signal 'file-error `("Cannot remove lock file for" ,file))))
     ;; `userlock--handle-unlock-error' exists since Emacs 28.1.  It
     ;; checks for `create-lockfiles' since Emacs 30.1, we don't need
     ;; this check here, then.