diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-08-16 14:46:23 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-08-16 14:46:23 +0000 |
commit | 29fec364c0ccf362af6cc232dbc2f3cbf3ec877e (patch) | |
tree | 6bbe10c420a48132dd90bc8ca1e9f5fb3fe2be6c /winsup/cygwin/dir.cc | |
parent | dec9daad4a6b6f5f705f8e637d21e9e035d08218 (diff) | |
download | cygnal-29fec364c0ccf362af6cc232dbc2f3cbf3ec877e.tar.gz cygnal-29fec364c0ccf362af6cc232dbc2f3cbf3ec877e.tar.bz2 cygnal-29fec364c0ccf362af6cc232dbc2f3cbf3ec877e.zip |
* dir.cc (readdir_worker): Convert w32name to PUNICODE_STRING.
* sec_acl.cc (getacl): Convert debug output to print native NT path.
* security.cc (set_file_attribute): Ditto.
* syscalls.cc (try_to_bin): Ditto and fix buggy debug statement.
Diffstat (limited to 'winsup/cygwin/dir.cc')
-rw-r--r-- | winsup/cygwin/dir.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index 72d6ac1ab..c1f325ea6 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -140,14 +140,15 @@ readdir_worker (DIR *dir, dirent *de) de->d_ino = ((fhandler_base *) dir->__fh)->get_namehash (); if (!is_dot && !is_dot_dot) { - const char *w32name = ((fhandler_base *) dir->__fh)->get_win32_name (); + PUNICODE_STRING w32name = + ((fhandler_base *) dir->__fh)->pc.get_nt_native_path (); DWORD devn = ((fhandler_base *) dir->__fh)->get_device (); /* Paths below /proc don't have a Win32 pendant. */ if (isproc_dev (devn)) - de->d_ino = hash_path_name (de->d_ino, "/"); - /* A drive's root dir has a trailing backslash already. */ - else if (w32name[1] != ':' || w32name[2] != '\\' || w32name[3]) - de->d_ino = hash_path_name (de->d_ino, "\\"); + de->d_ino = hash_path_name (de->d_ino, L"/"); + else if (w32name->Buffer[w32name->Length / sizeof (WCHAR) - 1] + != L'\\') + de->d_ino = hash_path_name (de->d_ino, L"\\"); de->d_ino = hash_path_name (de->d_ino, de->d_name); } } |