bug-coreutils
[Top][All Lists]
Advanced

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

Re: Bug in mkdir: Misleading Error Message


From: Paul Eggert
Subject: Re: Bug in mkdir: Misleading Error Message
Date: Mon, 06 Sep 2004 14:26:33 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Dmytro Taranovsky <address@hidden> writes:

> mkdir: cannot create directory `new/new': No such file or directory

Here's another good one:

  $ mkdir /bin/sh/foo
  mkdir: cannot create directory `/bin/sh/foo': Not a directory

> mkdir should print a more accurate error message,

Well, the existing messages are accurate, it's just that one needs to
know what they mean.  (:-)

Unfortunately nicening up the messages wouldn't be that easy, as the
most natural implementation of mkdir is to use the mkdir system call
and to use perror when it fails.  It's not easy to see how mkdir could
do a better job in general.  I suppose it could poke around in the
file system, but it'd be vulnerable to printing the wrong diagnostic
if some other process is modifying the file system at the same time.




reply via email to

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