diff options
author | Chris Phillips <chrisp@hp.com> | 2013-10-18 20:10:18 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-10-18 20:10:18 +0000 |
commit | c32ad351618b43f9307823d9acb748bc42c58333 (patch) | |
tree | bbfa4713a4cbd6d905e1be72b4295b60870cec45 /ShellPkg | |
parent | 58b7301ec9fc8df2b3955b1c04d304730538ed27 (diff) | |
download | edk2-platforms-c32ad351618b43f9307823d9acb748bc42c58333.tar.xz |
ShellPkg: Fix for the âmvâ command when destination starts with â\â.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14787 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg')
-rw-r--r-- | ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c index 0d01ad7487..65e83ccc0f 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c @@ -1,6 +1,7 @@ /** @file
Main file for mv shell level 2 function.
+ Copyright (c) 2013, Hewlett-Packard Development Company, L.P.
Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -137,6 +138,7 @@ GetDestinationLocation( EFI_SHELL_FILE_INFO *Node;
CHAR16 *DestPath;
UINTN NewSize;
+ UINTN CurrentSize;
DestList = NULL;
DestPath = NULL;
@@ -151,6 +153,13 @@ GetDestinationLocation( }
StrCpy(DestPath, Cwd);
while (PathRemoveLastItem(DestPath)) ;
+
+ //
+ // Append DestDir beyond '\' which may be present
+ //
+ CurrentSize = StrSize(DestPath);
+ StrnCatGrow(&DestPath, &CurrentSize, &DestDir[1], 0);
+
*DestPathPointer = DestPath;
return (SHELL_SUCCESS);
}
|