summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c9
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);
}