]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel2CommandsLib/Cd.c
This refactors 3 functions out of ShellCommandLib and puts them into a new library...
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel2CommandsLib / Cd.c
index bee4b0ae43989d8486fa5b3e8acced18b6a9034f..82d1c39df0cdffea0b5bf35db0bbf4bc7e0139e7 100644 (file)
@@ -108,7 +108,7 @@ ShellCommandRunCd (
           ShellStatus = SHELL_NOT_FOUND;\r
         } else {\r
           Drive = GetFullyQualifiedPath(Directory);\r
-          ChopLastSlash(Drive);\r
+          PathRemoveLastItem(Drive);\r
         }\r
         if (ShellStatus == SHELL_SUCCESS && Drive != NULL) {\r
           //\r
@@ -130,7 +130,7 @@ ShellCommandRunCd (
           ShellStatus = SHELL_NOT_FOUND;\r
         } else {\r
           Drive = GetFullyQualifiedPath(Directory);\r
-          while (ChopLastSlash(Drive)) ;\r
+          while (PathRemoveLastItem(Drive)) ;\r
         }\r
         if (ShellStatus == SHELL_SUCCESS && Drive != NULL) {\r
           //\r
@@ -150,7 +150,7 @@ ShellCommandRunCd (
           ASSERT((Drive == NULL && DriveSize == 0) || (Drive != NULL));\r
           Drive = StrnCatGrow(&Drive, &DriveSize, ShellGetCurrentDir(NULL), 0);\r
           if (*Param1 == L'\\') {\r
-            while (ChopLastSlash(Drive)) ;\r
+            while (PathRemoveLastItem(Drive)) ;\r
             Drive = StrnCatGrow(&Drive, &DriveSize, Param1+1, 0);\r
           } else {\r
             Drive = StrnCatGrow(&Drive, &DriveSize, Param1, 0);\r