xcopy: Assume directory if destination ends with a backslash.

oldstable
Martin Wilck 2010-11-05 00:34:26 +01:00 committed by Alexandre Julliard
parent 5fb37aa454
commit 20feb4772c
1 changed files with 4 additions and 2 deletions

View File

@ -519,8 +519,10 @@ static int XCOPY_ProcessDestParm(WCHAR *supplieddestination, WCHAR *stem, WCHAR
if (attribs == INVALID_FILE_ATTRIBUTES) {
/* If /I supplied and wildcard copy, assume directory */
if (flags & OPT_ASSUMEDIR &&
(wcschr(srcspec, '?') || wcschr(srcspec, '*'))) {
/* Also if destination ends with backslash */
if ((flags & OPT_ASSUMEDIR &&
(wcschr(srcspec, '?') || wcschr(srcspec, '*'))) ||
(supplieddestination[lstrlenW(supplieddestination)-1] == '\\')) {
isDir = TRUE;