xcopy: Assume directory if destination ends with a backslash.
This commit is contained in:
parent
5fb37aa454
commit
20feb4772c
|
@ -519,8 +519,10 @@ static int XCOPY_ProcessDestParm(WCHAR *supplieddestination, WCHAR *stem, WCHAR
|
||||||
if (attribs == INVALID_FILE_ATTRIBUTES) {
|
if (attribs == INVALID_FILE_ATTRIBUTES) {
|
||||||
|
|
||||||
/* If /I supplied and wildcard copy, assume directory */
|
/* If /I supplied and wildcard copy, assume directory */
|
||||||
if (flags & OPT_ASSUMEDIR &&
|
/* Also if destination ends with backslash */
|
||||||
(wcschr(srcspec, '?') || wcschr(srcspec, '*'))) {
|
if ((flags & OPT_ASSUMEDIR &&
|
||||||
|
(wcschr(srcspec, '?') || wcschr(srcspec, '*'))) ||
|
||||||
|
(supplieddestination[lstrlenW(supplieddestination)-1] == '\\')) {
|
||||||
|
|
||||||
isDir = TRUE;
|
isDir = TRUE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue