Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8a84148e
Commit
8a84148e
authored
Jun 24, 2018
by
Jason Edmeades
Committed by
Alexandre Julliard
Jun 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xcopy: Return code 1 for no files is never returned.
Signed-off-by:
Jason Edmeades
<
us@edmeades.me.uk
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7396f329
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
xcopy.c
programs/xcopy/tests/xcopy.c
+1
-3
xcopy.c
programs/xcopy/xcopy.c
+4
-3
No files found.
programs/xcopy/tests/xcopy.c
View file @
8a84148e
...
...
@@ -97,17 +97,15 @@ static void test_parms_syntax(void)
DeleteFileA("xcopytest\\xcopy1"); */
rc
=
runcmd
(
"xcopy /D/S xcopytest xcopytest2
\\
"
);
todo_wine
ok
(
rc
==
0
,
"xcopy /D/S test failed rc=%u
\n
"
,
rc
);
ok
(
GetFileAttributesA
(
"xcopytest2"
)
==
INVALID_FILE_ATTRIBUTES
,
"xcopy copied empty directory incorrectly
\n
"
);
rc
=
runcmd
(
"xcopy /D/S/E xcopytest xcopytest2
\\
"
);
todo_wine
{
ok
(
rc
==
0
,
"xcopy /D/S/E test failed rc=%u
\n
"
,
rc
);
todo_wine
ok
(
GetFileAttributesA
(
"xcopytest2"
)
!=
INVALID_FILE_ATTRIBUTES
,
"xcopy failed to copy empty directory
\n
"
);
}
RemoveDirectoryA
(
"xcopytest2"
);
}
...
...
programs/xcopy/xcopy.c
View file @
8a84148e
...
...
@@ -31,12 +31,14 @@
/*
* Notes:
*
Apparently,
valid return codes are:
*
Documented
valid return codes are:
* 0 - OK
* 1 - No files found to copy
* 1 - No files found to copy
(*1)
* 2 - CTRL+C during copy
* 4 - Initialization error, or invalid source specification
* 5 - Disk write error
*
* (*1) Testing shows return code 1 is never returned
*/
...
...
@@ -1165,7 +1167,6 @@ int wmain (int argc, WCHAR *argvW[])
}
else
if
(
!
(
flags
&
OPT_NOCOPY
))
{
XCOPY_wprintf
(
XCOPY_LoadMessage
(
STRING_COPY
),
filesCopied
);
}
if
(
rc
==
RC_OK
&&
filesCopied
==
0
)
rc
=
RC_NOFILES
;
return
rc
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment