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: Future setup regression caused by 'mkdir: always check-for-existence' commit

On 8/26/2019 1:33 PM, Ken Brown wrote:
> I don't think you understand the logic change in that commit.  An attempt to create an existing directory would already fail before that commit; the failure would occur in the call to fh->mkdir().  The commit in question simply guarantees that the error code is EEXIST.  Take a look at the commit message.

I installed the current release of Cygwin with all the default packages (so cygwin package version 3.0.7-1) and tested the scenario that Git for Windows runs into, which is that prior to running its post-install script (, there is no "dev" directory present on the host Windows machine (I just renamed it to "dev2" before running Cygwin.bat). Running "mkdir -m 0755 /dev" in Cygwin *succeeds* with exit code 0. I then deleted that installation and installed Cygwin again, only changing the cygwin package version to 3.1.0-0.2 (test). Tried the same scenario again and "mkdir -m 0755 /dev" fails with the error " mkdir: cannot create directory '/dev': File exists".

I should also point out that this change in behavior starts not in 3.1.0 but in 3.0.7-3, and in-between 3.0.7-1 and 3.0.7-3 the commit I mention seemed like the most reasonable reason for it.

All this said, Cygwin succeeds in both cases. And now that I look, I think the Cygwin setup program explicitly creates "/dev" as a standard directory so it avoids this change in behavior.

Given that the new behavior is obviously correct, I assume this means there is nothing for Cygwin to do, and the fix is for Git for Windows to explicitly create this directory.


Problem reports:
Unsubscribe info:

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