* fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Use POSIX
path to check for symlink.
This commit is contained in:
		| @@ -1,3 +1,8 @@ | |||||||
|  | 2011-02-15  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
|  | 	* fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Use POSIX | ||||||
|  | 	path to check for symlink. | ||||||
|  |  | ||||||
| 2011-02-14  Corinna Vinschen  <corinna@vinschen.de> | 2011-02-14  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
| 	* config/i386/profile.h: Sync with Mingw. | 	* config/i386/profile.h: Sync with Mingw. | ||||||
|   | |||||||
| @@ -1829,20 +1829,12 @@ fhandler_disk_file::readdir_helper (DIR *dir, dirent *de, DWORD w32_err, | |||||||
|       if (RtlEqualUnicodeString (&uname, &ro_u_lnk, TRUE)) |       if (RtlEqualUnicodeString (&uname, &ro_u_lnk, TRUE)) | ||||||
| 	{ | 	{ | ||||||
| 	  tmp_pathbuf tp; | 	  tmp_pathbuf tp; | ||||||
| 	  UNICODE_STRING fbuf; | 	  char *file = tp.c_get (); | ||||||
|  | 	  char *p = stpcpy (file, pc.normalized_path); | ||||||
| 	  tp.u_get (&fbuf); | 	  *p++ = '/'; | ||||||
| 	  RtlCopyUnicodeString (&fbuf, pc.get_nt_native_path ()); | 	  sys_wcstombs (p, NT_MAX_PATH - (p - file), | ||||||
| 	  RtlAppendUnicodeToString (&fbuf, L"\\"); | 			fname->Buffer, fname->Length / sizeof (WCHAR)); | ||||||
| 	  RtlAppendUnicodeStringToString (&fbuf, fname); | 	  path_conv fpath (file, PC_SYM_NOFOLLOW); | ||||||
| 	  fbuf.Buffer += 4; /* Skip leading \??\ */ |  | ||||||
| 	  fbuf.Length -= 4 * sizeof (WCHAR); |  | ||||||
| 	  if (fbuf.Buffer[1] != L':') /* UNC path */ |  | ||||||
| 	    { |  | ||||||
| 	      *(fbuf.Buffer += 2) = L'\\'; |  | ||||||
| 	      fbuf.Length -= 2 * sizeof (WCHAR); |  | ||||||
| 	    } |  | ||||||
| 	  path_conv fpath (&fbuf, PC_SYM_NOFOLLOW); |  | ||||||
| 	  if (fpath.issymlink ()) | 	  if (fpath.issymlink ()) | ||||||
| 	    { | 	    { | ||||||
| 	      fname->Length -= 4 * sizeof (WCHAR); | 	      fname->Length -= 4 * sizeof (WCHAR); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user