Re: git's use of mkdir(2)

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

 



der Mouse <mouse@xxxxxxxxxxxxxxxxxxxx> writes:

> I've been trying to convince git to run on some of the systems I use.
> Of particular relevance at the moment are two BSD systems which have an
> important behavioural difference.
>
> Specifically, if /foo/bar does not exist but /foo does,
> mkdir("/foo/bar/",...) works on one and fails showing ENOENT on the
> other.  (Without the trailing slash, it works on both.)

What vintage of BSD do you have that exhibits the problem?  It smells like
a POSIX violation, considering what "4.12 Pathname Resolution" says on the
matter:

  A pathname that contains at least one non-<slash> character and that
  ends with one or more trailing <slash> characters shall not be resolved
  successfully unless the last pathname component before the trailing
  <slash> characters names an existing directory or a directory entry that
  is to be created for a directory immediately after the pathname is
  resolved.

Not that I am saying that such a system does not deserve to be supported,
but I am curious to know how widespread the damage is.

> here to ask (a) if this is a known issue and fixed in something more
> recent (I had a look at 1.7.2 and a quick read of the code makes me
> think it still does this, but I could have missed something)

I don't think so---we seem to have a compat/ replacement "mkdir(2)" for
MinGW (but that doesn't trim the trailing slash so I would imagine MinGW
does not suffer from such a violation), but not for the flavor of BSD you
have.  It shouldn't be hard to add one, though.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]