Author: gschneider
Date: Sun Apr 4 16:04:24 2010
New Revision: 46718
URL:
http://svn.reactos.org/svn/reactos?rev=46718&view=rev
Log:
[CMD]
- Don't prefix double quotation marks during file completion
See issue #4491 for more details.
Modified:
trunk/reactos/base/shell/cmd/filecomp.c
Modified: trunk/reactos/base/shell/cmd/filecomp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/filecomp.c?…
==============================================================================
--- trunk/reactos/base/shell/cmd/filecomp.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/filecomp.c [iso-8859-1] Sun Apr 4 16:04:24 2010
@@ -703,7 +703,7 @@
LastSpace = i;
}
- /* insert the quoation and move things around */
+ /* insert the quotation and move things around */
if(szPrefix[LastSpace + 1] != _T('\"') && LastSpace != -1)
{
memmove ( &szPrefix[LastSpace+1], &szPrefix[LastSpace],
(_tcslen(szPrefix)-LastSpace+1) * sizeof(TCHAR) );
@@ -712,14 +712,17 @@
{
_tcscat(szPrefix,_T("\""));
}
- szPrefix[LastSpace + 1] = _T('\"');
+ szPrefix[LastSpace + 1] = _T('\"');
}
else if(LastSpace == -1)
{
- _tcscpy(szBaseWord,_T("\""));
- _tcscat(szBaseWord,szPrefix);
- _tcscpy(szPrefix,szBaseWord);
-
+ /* Add quotation only if none exists already */
+ if (szPrefix[0] != _T('\"'))
+ {
+ _tcscpy(szBaseWord,_T("\""));
+ _tcscat(szBaseWord,szPrefix);
+ _tcscpy(szPrefix,szBaseWord);
+ }
}
}