From 7d472ee6628ae5e271ec4b0a05e01f0f73a699ef Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Thu, 7 Jul 2005 16:22:45 +0000 Subject: [PATCH] Fix bug "mv foo.txt c:\temp gives you c:\tempfoo.txt" by Brandon Turner svn path=/trunk/; revision=16486 --- reactos/subsys/system/cmd/move.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reactos/subsys/system/cmd/move.c b/reactos/subsys/system/cmd/move.c index 6d9a2275f4d..25a075bb63c 100644 --- a/reactos/subsys/system/cmd/move.c +++ b/reactos/subsys/system/cmd/move.c @@ -182,9 +182,10 @@ INT cmd_move (LPTSTR cmd, LPTSTR param) /*build the dest string(accounts for *)*/ TCHAR szFullDestPath[MAX_PATH]; _tcscpy (szFullDestPath, szDestPath); - /*this line causes a one to many slashes, GetFullPathName must - be adding on a \ when it sees that is a dir*/ - //_tcscat (szFullDestPath, _T("\\")); + /*check to see if there is an ending slash, if not add one*/ + if(szFullDestPath[_tcslen(szFullDestPath) - 1] != _T('\\')) + _tcscat (szFullDestPath, _T("\\")); + _tcscat (szFullDestPath, findBuffer.cFileName); /*checks to make sure user wanted/wants the override*/