From b0717aae021d618cc281ad0343ac474d6e0d8f38 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 12 Mar 2008 16:07:04 +0000 Subject: * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Disable munging. Convert all chars in the 0xf0xx area to it's ascii equivalent. * path.cc (normalize_posix_path): Don't treat "X:foo" as windows path, only "a:\foo". (tfx_chars): New transformation table for special DOS chars. (tfx_chars_managed): Ditto, plus transformation of uppercase ASCII chars. (transform_chars): New function. (get_nt_native_path): Make static. Call transform_chars for all valid FS paths. Get additional flag if file is managed or not. Accommodate throughout. (getfileattr): Get additional flag if file is managed or not. Accommodate throughout. (path_conv::check): Disable special handling for trailing dots and spaces. (mount_item::build_win32): Disable code for managed paths. (mount_info::conv_to_posix_path): Ditto. * path.h (get_nt_native_path): Remove declaration. --- winsup/cygwin/fhandler_disk_file.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'winsup/cygwin/fhandler_disk_file.cc') diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 061f6ea9a..54a0f93c8 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1785,6 +1785,11 @@ fhandler_disk_file::readdir_helper (DIR *dir, dirent *de, DWORD w32_err, } } + /* Transform special DOS chars back to normal. */ + for (USHORT i = 0; i < fname->Length / sizeof (WCHAR); ++i) + if ((fname->Buffer[i] & 0xff00) == 0xf000) + fname->Buffer[i] &= 0xff; +#if 0 if (pc.isencoded ()) { char tmp[NAME_MAX + 1]; @@ -1793,6 +1798,7 @@ fhandler_disk_file::readdir_helper (DIR *dir, dirent *de, DWORD w32_err, fnunmunge (de->d_name, tmp); } else +#endif sys_wcstombs (de->d_name, NAME_MAX + 1, fname->Buffer, fname->Length / sizeof (WCHAR)); -- cgit v1.2.3