Fix handling of /.filename
This commit is contained in:
parent
6b762a4ec6
commit
7203adb1cc
|
@ -1,4 +1,4 @@
|
|||
Fri Apr 21 01:27:47 2000 Christopher Faylor <cgf@cygnus.com>
|
||||
Fri Apr 21 10:37:08 2000 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* path.cc (normalize_posix_path): Previous two patches were still
|
||||
incorrect so rewrite this function to deal with trailing dots.
|
||||
|
|
|
@ -561,7 +561,11 @@ normalize_posix_path (const char *cwd, const char *src, char *dst)
|
|||
strcpy (dst, cwd);
|
||||
dst = strchr (dst, '\0');
|
||||
if (*src == '.')
|
||||
goto sawdot;
|
||||
{
|
||||
if (dst == dst_start + 1)
|
||||
dst--;
|
||||
goto sawdot;
|
||||
}
|
||||
if (dst > dst_start && !isslash (dst[-1]))
|
||||
*dst++ = '/';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue