On 5/1/20 1:21 PM, Jonny Grant wrote:
> yes, the fix pretty trivial for mkdir as you highlight EISDIR:
> stat(), S_ISDIR(sb.st_mode), and set errno to EISDIR or output
> strerror(EISDIR)
That would introduce a race condition, and wouldn't behave correctly if some
other process changes the destina
On 01/05/2020 19:07, Paul Eggert wrote:
On 5/1/20 9:16 AM, Jonny Grant wrote:
rm: cannot remove 'test': Is a directory
That's because rm used unlink which failed with EISDIR, which is a different
error number.
yes, the fix pretty trivial for mkdir as you highlight EISDIR:
stat(), S_ISDIR(
On 5/1/20 9:16 AM, Jonny Grant wrote:
> rm: cannot remove 'test': Is a directory
That's because rm used unlink which failed with EISDIR, which is a different
error number.
Consider this example:
$ >d # Create an empty regular file.
$ mkdir d
mkdir: cannot create directory ‘d’: File e
On 01/05/2020 16:54, Eric Blake wrote:
tag 41001 notabug
thanks
On 5/1/20 10:06 AM, Jonny Grant wrote:
Hello!
Can this error message be clarified? The directory already exists, it
is not a file.
By one definition, a directory _is_ a file, just with different
semantics (in the same way a
tag 41001 notabug
thanks
On 5/1/20 10:06 AM, Jonny Grant wrote:
Hello!
Can this error message be clarified? The directory already exists, it is
not a file.
By one definition, a directory _is_ a file, just with different
semantics (in the same way a block device, character device, symlink,
Hello!
Can this error message be clarified? The directory already exists, it is
not a file.
lib/mkdir-p.c:200 contains this line of code that triggers below:-
error (0, mkdir_errno, _("cannot create directory %s"), quote (dir));
As it's easy enough to know that the reason mkdir fails is beca