emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 530ac51f5b: Remove lock file in --no-build-details, too


From: Lars Ingebrigtsen
Subject: master 530ac51f5b: Remove lock file in --no-build-details, too
Date: Mon, 7 Mar 2022 12:03:56 -0500 (EST)

branch: master
commit 530ac51f5b83b4ad189d55047f149e4bc0750f20
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Remove lock file in --no-build-details, too
    
    * src/filelock.c (current_lock_owner): Make file writes work when
    using --no-build-details (bug#54294).
---
 src/filelock.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/filelock.c b/src/filelock.c
index cb548ac79b..4fdad8d856 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -578,8 +578,13 @@ current_lock_owner (lock_info_type *owner, char *lfname)
   if (lfinfo_end != owner->user + lfinfolen)
     return EINVAL;
 
-  /* On current host?  */
   Lisp_Object system_name = Fsystem_name ();
+  /* If `system-name' returns nil, that means we're in a
+     --no-build-details Emacs, and the name part of the link (e.g.,
+     .#test.txt -> larsi@.118961:1646577954) is an empty string.  */
+  if (NILP (system_name))
+    system_name = build_string ("");
+  /* On current host?  */
   if (STRINGP (system_name)
       && dot - (at + 1) == SBYTES (system_name)
       && memcmp (at + 1, SSDATA (system_name), SBYTES (system_name)) == 0)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]