bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#46397: 27.1; Cannot delete buffer pointing to a file in a path that


From: Paul Eggert
Subject: bug#46397: 27.1; Cannot delete buffer pointing to a file in a path that includes a file
Date: Sat, 6 Mar 2021 18:50:29 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 3/6/21 1:36 AM, Eli Zaretskii wrote:
I'm asking what is the difference, from the file-locking POV, between
an inaccessible directory and a directory that doesn't exist?

In the former (EACCES) case, it's possible that the lockfile exists but Emacs cannot remove it because the user currently lacks permissions to an ancestor directory; this serious problem is worth reporting to the user.

In the latter (ENOTDIR) case the lockfile cannot possibly exist, and Emacs can treat ENOTDIR differently from EACCES for that reason. It makes sense for Emacs to treat ENOTDIR like ENOENT, since in both cases the lockfile cannot possibly exist and these are the only two error numbers with that property.

It might also make sense to treat ENOTDIR specially (neither like EACCES nor like ENOENT) but that's a discussion we haven't had yet, as far as I know.

We've spent more time on this ENOENT/ENOTDIR issue than it's worth, so feel free to revert my change and install whatever other change you like. I'm sure there are lots of ways to fix the underlying problem.





reply via email to

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