mirror of
https://github.com/reactos/reactos.git
synced 2024-08-04 02:20:54 +00:00
don't try to append when there is only one parameter given
See issue #3023 for more details. svn path=/trunk/; revision=32062
This commit is contained in:
parent
918dc6ab7d
commit
08720c6375
|
@ -539,17 +539,20 @@ INT cmd_copy (LPTSTR cmd, LPTSTR param)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(((_tcschr (arg[nSrc], _T('+')) != NULL) ||
|
if (nDes != -1) /* you can only append files when there is a destination */
|
||||||
(_tcschr (arg[nSrc], _T('*')) != NULL && _tcschr (arg[nDes], _T('*')) == NULL) ||
|
|
||||||
(IsExistingDirectory (arg[nSrc]) && (_tcschr (arg[nDes], _T('*')) == NULL && !IsExistingDirectory (arg[nDes])))
|
|
||||||
))
|
|
||||||
{
|
{
|
||||||
/* There is a + in the source filename, this means
|
if(((_tcschr (arg[nSrc], _T('+')) != NULL) ||
|
||||||
that there is more then one file being put into
|
(_tcschr (arg[nSrc], _T('*')) != NULL && _tcschr (arg[nDes], _T('*')) == NULL) ||
|
||||||
one file. */
|
(IsExistingDirectory (arg[nSrc]) && (_tcschr (arg[nDes], _T('*')) == NULL && !IsExistingDirectory (arg[nDes])))
|
||||||
bAppend = TRUE;
|
))
|
||||||
if(_tcschr (arg[nSrc], _T('+')) != NULL)
|
{
|
||||||
appendPointer = arg[nSrc];
|
/* There is a + in the source filename, this means
|
||||||
|
that there is more then one file being put into
|
||||||
|
one file. */
|
||||||
|
bAppend = TRUE;
|
||||||
|
if(_tcschr (arg[nSrc], _T('+')) != NULL)
|
||||||
|
appendPointer = arg[nSrc];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reusing the number of files variable */
|
/* Reusing the number of files variable */
|
||||||
|
|
Loading…
Reference in a new issue