mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-24 15:09:42 +00:00
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
@ -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 New Issue
Block a user