X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=ShellPkg%2FLibrary%2FUefiShellLevel2CommandsLib%2FCd.c;h=82d1c39df0cdffea0b5bf35db0bbf4bc7e0139e7;hb=ab94587a7d2cd89695f9190420daceae0d2b7446;hp=bee4b0ae43989d8486fa5b3e8acced18b6a9034f;hpb=f1518f69703e1086f346a6e9d8e5a59855954178;p=mirror_edk2.git diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cd.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cd.c index bee4b0ae43..82d1c39df0 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cd.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cd.c @@ -108,7 +108,7 @@ ShellCommandRunCd ( ShellStatus = SHELL_NOT_FOUND; } else { Drive = GetFullyQualifiedPath(Directory); - ChopLastSlash(Drive); + PathRemoveLastItem(Drive); } if (ShellStatus == SHELL_SUCCESS && Drive != NULL) { // @@ -130,7 +130,7 @@ ShellCommandRunCd ( ShellStatus = SHELL_NOT_FOUND; } else { Drive = GetFullyQualifiedPath(Directory); - while (ChopLastSlash(Drive)) ; + while (PathRemoveLastItem(Drive)) ; } if (ShellStatus == SHELL_SUCCESS && Drive != NULL) { // @@ -150,7 +150,7 @@ ShellCommandRunCd ( ASSERT((Drive == NULL && DriveSize == 0) || (Drive != NULL)); Drive = StrnCatGrow(&Drive, &DriveSize, ShellGetCurrentDir(NULL), 0); if (*Param1 == L'\\') { - while (ChopLastSlash(Drive)) ; + while (PathRemoveLastItem(Drive)) ; Drive = StrnCatGrow(&Drive, &DriveSize, Param1+1, 0); } else { Drive = StrnCatGrow(&Drive, &DriveSize, Param1, 0);