[newlib-cygwin] Cygwin: Disable creating case-sensitive folders by default
Corinna Vinschen
corinna@sourceware.org
Fri Mar 1 13:38:00 GMT 2019
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=379598dd672d60b9f89d0b10d33b2f1859e7a024
commit 379598dd672d60b9f89d0b10d33b2f1859e7a024
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Fri Mar 1 14:32:08 2019 +0100
Cygwin: Disable creating case-sensitive folders by default
Inspecting the content of case-sensitive directories
on remote machines results in lots of errors like
disappearing diretories and files, file not found, etc.
This is not feasible as default behaviour
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/fhandler_disk_file.cc | 7 +++++++
winsup/cygwin/release/3.0.2 | 8 ++++++++
winsup/doc/new-features.xml | 7 ++-----
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 5a8463e..1931927 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -1778,6 +1778,12 @@ fhandler_disk_file::mkdir (mode_t mode)
pc.file_attributes (FILE_ATTRIBUTE_DIRECTORY);
if (has_acls ())
set_created_file_access (dir, pc, mode & 07777);
+#if 0
+ /* FIXME: This default behaviour badly breaks interoperability.
+ Inspecting the content of case-sensitive directories
+ on remote machines results in lots of errors like
+ disappearing diretories and files, file not found, etc. */
+
/* Starting with Windows 10 1803, try to create all dirs below the
installation root as case-sensitive. If STATUS_NOT_SUPPORTED
is returned, WSL isn't installed (unfortunately a requirement
@@ -1808,6 +1814,7 @@ fhandler_disk_file::mkdir (mode_t mode)
}
}
}
+#endif
NtClose (dir);
res = 0;
}
diff --git a/winsup/cygwin/release/3.0.2 b/winsup/cygwin/release/3.0.2
index e24fe4e..d0a592b 100644
--- a/winsup/cygwin/release/3.0.2
+++ b/winsup/cygwin/release/3.0.2
@@ -5,6 +5,14 @@ What's new:
What changed:
-------------
+- Windows 10 1803 or later and WSL installed:
+
+ Starting with 3.0.0, mkdir(2) automatically created directories within
+ the Cygwin installation dir as case sensitive. This badly breaks
+ interoperability with remote machines trying to access these dirs.
+ Therefore, disable this as default. You can still create case-sensitive
+ dirs via `chattr +C ...'
+
Bug Fixes
---------
diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml
index ab369ab..5bb4109 100644
--- a/winsup/doc/new-features.xml
+++ b/winsup/doc/new-features.xml
@@ -15,11 +15,8 @@ CLOCK_BOOTTIME_ALARM clocks.
</para></listitem>
<listitem><para>
-Support for case sensitive directories. mkdir(2) automatically creates
-directories within the Cygwin installation dir as case sensitive
-now.</para>
-
-<para>This feature requires Windows 10 1803 or later and WSL installed!
+Support for case sensitive directories via chattr(1). This feature requires
+Windows 10 1803 or later and WSL installed.
</para></listitem>
<listitem><para>
More information about the Cygwin-cvs
mailing list