Revision: 14787
          http://sourceforge.net/p/edk2/code/14787
Author:   jcarsey
Date:     2013-10-18 20:10:18 +0000 (Fri, 18 Oct 2013)
Log Message:
-----------
ShellPkg: Fix for the ?\226?\128?\152mv?\226?\128?\153 command when destination 
starts with ?\226?\128?\152\?\226?\128?\153.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <[email protected]>
reviewed-by: Jaben Carsey <[email protected]>

Modified Paths:
--------------
    trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c

Modified: trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c 2013-10-18 
18:53:16 UTC (rev 14786)
+++ trunk/edk2/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c 2013-10-18 
20:10:18 UTC (rev 14787)
@@ -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 @@
   EFI_SHELL_FILE_INFO       *Node;
   CHAR16                    *DestPath;
   UINTN                     NewSize;
+  UINTN                     CurrentSize;
 
   DestList = NULL;
   DestPath = NULL;
@@ -151,6 +153,13 @@
     }
     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);
   }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to