* fhandler.cc (fhandler_base::open): Remove HIDDEN_DOT_FILES code.
* fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto. * path.cc (symlink_worker): Ditto.
This commit is contained in:
parent
88d6787f07
commit
87a7ae5e7f
|
@ -1,3 +1,9 @@
|
|||
2007-08-12 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* 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 <corinna@vinschen.de>
|
||||
|
||||
* syscalls.cc (getw): Remove redundant implementation.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue