* path.cc (normalize_win32_path): Remove unneeded check for dots.
This commit is contained in:
		| @@ -1,3 +1,7 @@ | |||||||
|  | 2004-12-20  Christopher Faylor  <cgf@timesys.com> | ||||||
|  |  | ||||||
|  | 	* path.cc (normalize_win32_path): Remove unneeded check for dots. | ||||||
|  |  | ||||||
| 2004-12-20  Christopher Faylor  <cgf@timesys.com> | 2004-12-20  Christopher Faylor  <cgf@timesys.com> | ||||||
|  |  | ||||||
| 	* path.cc (normalize_posix_path): Remove unneeded check for dots. | 	* path.cc (normalize_posix_path): Remove unneeded check for dots. | ||||||
|   | |||||||
| @@ -1010,7 +1010,9 @@ normalize_win32_path (const char *src, char *dst, char *&tail) | |||||||
| 	       /* dst must be greater than dst_start */ | 	       /* dst must be greater than dst_start */ | ||||||
| 	       && tail[-1] == '\\') | 	       && tail[-1] == '\\') | ||||||
| 	{ | 	{ | ||||||
| 	  if (isdirsep (src[2]) || src[2] == 0) | 	  if (!isdirsep (src[2]) && src[2] != '\0') | ||||||
|  | 	      *tail++ = *src++; | ||||||
|  | 	  else | ||||||
| 	    { | 	    { | ||||||
| 	      /* Back up over /, but not if it's the first one.  */ | 	      /* Back up over /, but not if it's the first one.  */ | ||||||
| 	      if (tail > dst + 1) | 	      if (tail > dst + 1) | ||||||
| @@ -1022,13 +1024,6 @@ normalize_win32_path (const char *src, char *dst, char *&tail) | |||||||
| 	      if (isdirsep (*src)) | 	      if (isdirsep (*src)) | ||||||
| 		src++; | 		src++; | ||||||
| 	    } | 	    } | ||||||
| 	  else |  | ||||||
| 	    { |  | ||||||
| 	      int n = strspn (src, "."); |  | ||||||
| 	      if (!src[n] || isdirsep (src[n])) /* just dots... */ |  | ||||||
| 		return ENOENT; |  | ||||||
| 	      *tail++ = *src++; |  | ||||||
| 	    } |  | ||||||
| 	} | 	} | ||||||
|       /* Otherwise, add char to result.  */ |       /* Otherwise, add char to result.  */ | ||||||
|       else |       else | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user