summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-sh.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net/tramp-sh.el')
-rw-r--r--lisp/net/tramp-sh.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index e6bd42a83ae..8b4c78fe65b 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -3249,7 +3249,7 @@ implementation will be used."
(format "File %s exists; overwrite anyway? " filename)))))
(tramp-error v 'file-already-exists filename))
- (let (file-locked
+ (let ((file-locked (eq (file-locked-p lockname) t))
(uid (or (tramp-compat-file-attribute-user-id
(file-attributes filename 'integer))
(tramp-get-remote-uid v 'integer)))
@@ -3260,7 +3260,7 @@ implementation will be used."
;; Lock file.
(when (and (not (auto-save-file-name-p (file-name-nondirectory filename)))
(file-remote-p lockname)
- (not (eq (file-locked-p lockname) t)))
+ (not file-locked))
(setq file-locked t)
;; `lock-file' exists since Emacs 28.1.
(tramp-compat-funcall 'lock-file lockname))
@@ -3481,7 +3481,7 @@ implementation will be used."
(tramp-set-file-uid-gid filename uid gid))
;; Unlock file.
- (when (and file-locked (eq (file-locked-p lockname) t))
+ (when file-locked
;; `unlock-file' exists since Emacs 28.1.
(tramp-compat-funcall 'unlock-file lockname))