emacs-diffs
[Top][All Lists]
Advanced

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

master 4459dcc 1/2: Fix file lock issue (Bug#46397)


From: Paul Eggert
Subject: master 4459dcc 1/2: Fix file lock issue (Bug#46397)
Date: Wed, 10 Feb 2021 13:58:46 -0500 (EST)

branch: master
commit 4459dcc07865f6ae1f21f624fcb09cf8fdaecdb5
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Fix file lock issue (Bug#46397)
    
    * src/filelock.c (current_lock_owner):
    Also treat ENOTDIR as meaning the lock file does not exist.
---
 src/filelock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/filelock.c b/src/filelock.c
index 35baa0c..373fc00 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -532,7 +532,7 @@ current_lock_owner (lock_info_type *owner, char *lfname)
   /* If nonexistent lock file, all is well; otherwise, got strange error. */
   lfinfolen = read_lock_data (lfname, owner->user);
   if (lfinfolen < 0)
-    return errno == ENOENT ? 0 : errno;
+    return errno == ENOENT || errno == ENOTDIR ? 0 : errno;
   if (MAX_LFINFO < lfinfolen)
     return ENAMETOOLONG;
   owner->user[lfinfolen] = 0;



reply via email to

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