* cygheap.cc (cygheap_user::set_name): Correct thinko in below change.
This commit is contained in:
		
							parent
							
								
									c99902b9b0
								
							
						
					
					
						commit
						b3e2d035bb
					
				|  | @ -1,3 +1,7 @@ | ||||||
|  | 2002-06-26  Christopher Faylor  <cgf@redhat.com> | ||||||
|  | 
 | ||||||
|  | 	* cygheap.cc (cygheap_user::set_name): Correct thinko in below change. | ||||||
|  | 
 | ||||||
| 2002-06-26  Christopher Faylor  <cgf@redhat.com> | 2002-06-26  Christopher Faylor  <cgf@redhat.com> | ||||||
| 
 | 
 | ||||||
| 	* cygheap.cc (cygheap_user::set_name): Avoid clearing things when just | 	* cygheap.cc (cygheap_user::set_name): Avoid clearing things when just | ||||||
|  |  | ||||||
|  | @ -440,12 +440,14 @@ cygheap_user::~cygheap_user () | ||||||
| void | void | ||||||
| cygheap_user::set_name (const char *new_name) | cygheap_user::set_name (const char *new_name) | ||||||
| { | { | ||||||
|   if (strcasematch (new_name, pname)) |  | ||||||
|     return;		/* nothing changed */ |  | ||||||
| 
 |  | ||||||
|   bool allocated = !!pname; |   bool allocated = !!pname; | ||||||
|  | 
 | ||||||
|   if (allocated) |   if (allocated) | ||||||
|     cfree (pname); |     { | ||||||
|  |       if (strcasematch (new_name, pname)) | ||||||
|  | 	return; | ||||||
|  |       cfree (pname); | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|   pname = cstrdup (new_name ? new_name : ""); |   pname = cstrdup (new_name ? new_name : ""); | ||||||
|   if (!allocated) |   if (!allocated) | ||||||
|  |  | ||||||
|  | @ -103,11 +103,13 @@ fhandler_disk_file::fstat_by_name (struct __stat64 *buf, path_conv *pc) | ||||||
| 
 | 
 | ||||||
|   if (!pc->exists ()) |   if (!pc->exists ()) | ||||||
|     { |     { | ||||||
|  |       debug_printf ("already determined that pc does not exist"); | ||||||
|       set_errno (ENOENT); |       set_errno (ENOENT); | ||||||
|       res = -1; |       res = -1; | ||||||
|     } |     } | ||||||
|   else if ((handle = FindFirstFile (pc->get_win32 (), &local)) == INVALID_HANDLE_VALUE) |   else if ((handle = FindFirstFile ((char *) pc, &local)) == INVALID_HANDLE_VALUE) | ||||||
|     { |     { | ||||||
|  |       debug_printf ("FindFirstFile failed, %E"); | ||||||
|       __seterrno (); |       __seterrno (); | ||||||
|       res = -1; |       res = -1; | ||||||
|     } |     } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue