From f162854f8e0abdca3894a0b87e5b9ba6b7908575 Mon Sep 17 00:00:00 2001 From: corinna Date: Sun, 12 Aug 2007 15:42:02 +0000 Subject: [PATCH] * fhandler.cc (fhandler_base::open): Remove HIDDEN_DOT_FILES code. * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto. * path.cc (symlink_worker): Ditto. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/fhandler.cc | 5 ----- winsup/cygwin/fhandler_disk_file.cc | 7 ------- winsup/cygwin/path.cc | 5 ----- 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 24c1704c34..dc82967f72 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2007-08-12 Corinna Vinschen + * fhandler.cc (fhandler_base::open): Remove HIDDEN_DOT_FILES code. + * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto. + * path.cc (symlink_worker): Ditto. + +2007-08-12 Corinna Vinschen + * syscalls.cc (getw): Remove redundant implementation. (putw): Ditto. (wcscmp): Ditto. diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 0b7cc61386..59ee6a496d 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -542,11 +542,6 @@ fhandler_base::open (int flags, mode_t mode) /* If mode has no write bits set, we set the R/O attribute. */ if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH))) file_attributes |= FILE_ATTRIBUTE_READONLY; -#ifdef HIDDEN_DOT_FILES - char *c = strrchr (get_win32_name (), '\\'); - if ((c && c[1] == '.') || *get_win32_name () == '.') - file_attributes |= FILE_ATTRIBUTE_HIDDEN; -#endif /* Starting with Windows 2000, when trying to overwrite an already existing file with FILE_ATTRIBUTE_HIDDEN and/or FILE_ATTRIBUTE_SYSTEM attribute set, CreateFile fails with ERROR_ACCESS_DENIED. diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 0fa807dd33..c929cddf80 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1478,13 +1478,6 @@ fhandler_disk_file::mkdir (mode_t mode) OBJECT_ATTRIBUTES attr; IO_STATUS_BLOCK io; ULONG fattr = FILE_ATTRIBUTE_DIRECTORY; -#ifdef HIDDEN_DOT_FILES - UNICODE_STRING basename; - - RtlSplitUnicodePath (pc.get_nt_native_path (), NULL, &basename); - if (basename.Buffer[0] == L'.') - fattr |= FILE_ATTRIBUTE_HIDDEN; -#endif status = NtCreateFile (&dir, FILE_LIST_DIRECTORY | SYNCHRONIZE, pc.get_object_attr (attr, sa), &io, NULL, fattr, FILE_SHARE_VALID_FLAGS, FILE_CREATE, diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 2374c1cb78..6620b02a4a 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -3072,11 +3072,6 @@ symlink_worker (const char *oldpath, const char *newpath, bool use_winsym, CloseHandle (h); DWORD attr = use_winsym ? FILE_ATTRIBUTE_READONLY : FILE_ATTRIBUTE_SYSTEM; -#ifdef HIDDEN_DOT_FILES - cp = strrchr (win32_path, '\\'); - if ((cp && cp[1] == '.') || *win32_path == '.') - attr |= FILE_ATTRIBUTE_HIDDEN; -#endif SetFileAttributes (win32_path, attr); res = 0; -- 2.11.0