From bd61a7f7b922dc8b14fc5cc395d0b5503673b219 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 16 Aug 2007 14:10:06 +0000 Subject: [PATCH] * fhandler.h (fhandler_base::get_namehash): Use NT native path. * fhandler_disk_file.cc (readdir_get_ino): Ditto in call to hash_path_name. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/fhandler.h | 2 +- winsup/cygwin/fhandler_disk_file.cc | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 9c953eb46..bc701fd5a 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2007-08-16 Corinna Vinschen + + * fhandler.h (fhandler_base::get_namehash): Use NT native path. + * fhandler_disk_file.cc (readdir_get_ino): Ditto in call to + hash_path_name. + 2007-08-16 Corinna Vinschen * ntdll.h (RtlCreateUnicodeStringFromAsciiz): Fix declaration. diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 56abcfbce..665dd51e1 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -251,7 +251,7 @@ class fhandler_base bool has_attribute (DWORD x) const {return pc.has_attribute (x);} const char *get_name () const { return pc.normalized_path; } const char *get_win32_name () { return pc.get_win32 (); } - __ino64_t get_namehash () { return namehash ?: namehash = hash_path_name (0, get_win32_name ()); } + __ino64_t get_namehash () { return namehash ?: namehash = hash_path_name (0, pc.get_nt_native_path ()); } /* Returns name used for /proc//fd in buf. */ virtual char *get_proc_fd_name (char *buf); diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 049928c98..cccd440f4 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1682,7 +1682,7 @@ readdir_get_ino (const char *path, bool dot_dot) ino = st.st_ino; } else if (!pc.hasgood_inode ()) - ino = hash_path_name (0, pc); + ino = hash_path_name (0, pc.get_nt_native_path ()); else if (NT_SUCCESS (NtOpenFile (&hdl, READ_CONTROL, pc.get_object_attr (attr, sec_none_nih), &io, FILE_SHARE_VALID_FLAGS,