From: Paul Eggert Date: Wed, 10 Feb 2021 18:50:44 +0000 (-0800) Subject: Fix file lock issue (Bug#46397) X-Git-Tag: emacs-28.0.90~3820 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4459dcc07865f6ae1f21f624fcb09cf8fdaecdb5;p=emacs.git Fix file lock issue (Bug#46397) * src/filelock.c (current_lock_owner): Also treat ENOTDIR as meaning the lock file does not exist. --- diff --git a/src/filelock.c b/src/filelock.c index 35baa0c6668..373fc00a42c 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;