This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mkdir -p and EROFS


Paul Eggert <eggert@CS.UCLA.EDU> wrote:
> ericblake@comcast.net (Eric Blake) writes:
>> The algorithm change between 5.3.0 and 5.90 in lib/mkdir-p.c to
>> try mkdir() first instead of stat(), and key off of EEXIST, breaks
>> when mkdir() fails with EROFS on an intermediate directory when
>> the writable directory has been mounted inside a read-only tree.
>
> Thanks for reporting this.  It is indeed a bug in
> coreutils/lib/mkdir-p.c.  It can be triggered by other errors too.
> This is hard to write a test case for, but I'd like to fix things.
> Does the following patch work for you?
>
> Jim, if this works for Eric, is it OK to install this patch at this late
> date?

Nice patch.
This seems safe enough, so yes, please apply.
Thanks!

> 2005-10-12  Paul Eggert  <eggert@cs.ucla.edu>
>
> 	* mkdir-p.c (make_dir_parents): Don't fail if an intervening mkdir
> 	fails due to EROFS, or due to EEXIST or other reasons for that matter.
> 	Problem reported by Eric Blake.
> 	(ENOSYS): Remove; no longer needed.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]