archelp: Fix handling of dot and dotdot at the end of the name.
Fixes cpio_test and tar_test.
This commit is contained in:
parent
ca73ae446c
commit
f34a422081
1 changed files with 2 additions and 2 deletions
|
@ -34,12 +34,12 @@ canonicalize (char *name)
|
|||
iptr++;
|
||||
if (iptr[0] == '.' && (iptr[1] == '/' || iptr[1] == 0))
|
||||
{
|
||||
iptr += 2;
|
||||
iptr++;
|
||||
continue;
|
||||
}
|
||||
if (iptr[0] == '.' && iptr[1] == '.' && (iptr[2] == '/' || iptr[2] == 0))
|
||||
{
|
||||
iptr += 3;
|
||||
iptr += 2;
|
||||
if (optr == name)
|
||||
continue;
|
||||
for (optr -= 2; optr >= name && *optr != '/'; optr--);
|
||||
|
|
Loading…
Reference in a new issue