* path.cc (mount_info::conv_to_win32_path): Previous patch was too aggressive
in adding a trailing slash.
This commit is contained in:
		| @@ -1,3 +1,8 @@ | |||||||
|  | Tue May 30 16:58:33 2000  Christopher Faylor <cgf@cygnus.com> | ||||||
|  |  | ||||||
|  | 	* path.cc (mount_info::conv_to_win32_path): Previous patch was too | ||||||
|  | 	aggressive in adding a trailing slash. | ||||||
|  |  | ||||||
| Mon May 29 20:31:01 2000  Christopher Faylor <cgf@cygnus.com> | Mon May 29 20:31:01 2000  Christopher Faylor <cgf@cygnus.com> | ||||||
|  |  | ||||||
| 	* Makefile.in: Remove libadvapi32.a. | 	* Makefile.in: Remove libadvapi32.a. | ||||||
|   | |||||||
| @@ -1020,12 +1020,14 @@ mount_info::conv_to_win32_path (const char *src_path, char *win32_path, | |||||||
|   else |   else | ||||||
|     { |     { | ||||||
|       int n = mi->native_pathlen; |       int n = mi->native_pathlen; | ||||||
|       memcpy (dst, mi->native_path, n); |       memcpy (dst, mi->native_path, n + 1); | ||||||
|       char *p = pathbuf + mi->posix_pathlen; |       char *p = pathbuf + mi->posix_pathlen; | ||||||
|       if (!trailing_slash_p && isdrive (mi->native_path) && !mi->native_path[2]) |  | ||||||
| 	trailing_slash_p = 1; |  | ||||||
|       if (!trailing_slash_p && !*p) |       if (!trailing_slash_p && !*p) | ||||||
|  | 	{ | ||||||
|  | 	  if (isdrive (dst) && !dst[2]) | ||||||
|  | 	    dst[n++] = '\\'; | ||||||
| 	  dst[n] = '\0'; | 	  dst[n] = '\0'; | ||||||
|  | 	} | ||||||
|       else |       else | ||||||
| 	{ | 	{ | ||||||
| 	  /* Do not add trailing \ to UNC device names like \\.\a: */ | 	  /* Do not add trailing \ to UNC device names like \\.\a: */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user