Commit 20feb477 authored by Martin Wilck's avatar Martin Wilck Committed by Alexandre Julliard

xcopy: Assume directory if destination ends with a backslash.

parent 5fb37aa4
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment