* fhandler_disk_file.cc (readdir_get_ino): Accommodate native symlinks.
* syscalls.cc (rename): Ditto.
This commit is contained in:
		
							parent
							
								
									64a62f4cfe
								
							
						
					
					
						commit
						e809fec984
					
				|  | @ -1,3 +1,8 @@ | |||
| 2007-08-02  Corinna Vinschen  <corinna@vinschen.de> | ||||
| 
 | ||||
| 	* fhandler_disk_file.cc (readdir_get_ino): Accommodate native symlinks. | ||||
| 	* syscalls.cc (rename): Ditto. | ||||
| 
 | ||||
| 2007-08-02  Christopher Faylor  <me+cygwin@cgf.cx> | ||||
| 
 | ||||
| 	* lib/Makefile: Add missed file to accommodate below changes. | ||||
|  |  | |||
|  | @ -1717,7 +1717,9 @@ readdir_get_ino (const char *path, bool dot_dot) | |||
|   else if (NT_SUCCESS (NtOpenFile (&hdl, READ_CONTROL, | ||||
| 				   pc.get_object_attr (attr, sec_none_nih), | ||||
| 				   &io, FILE_SHARE_VALID_FLAGS, | ||||
| 				   FILE_OPEN_FOR_BACKUP_INTENT))) | ||||
| 				   FILE_OPEN_FOR_BACKUP_INTENT | ||||
| 				   | (pc.is_rep_symlink () | ||||
| 				      ? FILE_OPEN_REPARSE_POINT : 0)))) | ||||
|     { | ||||
|       ino = readdir_get_ino_by_handle (hdl); | ||||
|       NtClose (hdl); | ||||
|  |  | |||
|  | @ -1516,7 +1516,9 @@ rename (const char *oldpath, const char *newpath) | |||
| 
 | ||||
|   /* DELETE is required to rename a file. */ | ||||
|   status = NtOpenFile (&fh, DELETE, oldpc.get_object_attr (attr, sec_none_nih), | ||||
| 		     &io, FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT); | ||||
| 		     &io, FILE_SHARE_VALID_FLAGS, | ||||
| 		     FILE_OPEN_FOR_BACKUP_INTENT | ||||
| 		     | (oldpc.is_rep_symlink () ? FILE_OPEN_REPARSE_POINT : 0)); | ||||
|   if (!NT_SUCCESS (status)) | ||||
|     { | ||||
|       __seterrno_from_nt_status (status); | ||||
|  | @ -1535,7 +1537,10 @@ rename (const char *oldpath, const char *newpath) | |||
|       && ofsi.NumberOfLinks > 1 | ||||
|       && NT_SUCCESS (NtOpenFile (&nfh, READ_CONTROL, | ||||
| 		     (removepc ?: dstpc)->get_object_attr (attr, sec_none_nih), | ||||
| 		     &io, FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT))) | ||||
| 		     &io, FILE_SHARE_VALID_FLAGS, | ||||
| 		     FILE_OPEN_FOR_BACKUP_INTENT | ||||
| 		     | ((removepc ?: dstpc)->is_rep_symlink () | ||||
| 		     	? FILE_OPEN_REPARSE_POINT : 0)))) | ||||
|     { | ||||
|       static const size_t vsiz = sizeof (FILE_FS_VOLUME_INFORMATION) | ||||
| 				 + 32 * sizeof (WCHAR); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue