Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c8fcedcf
Commit
c8fcedcf
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: Fix copying empty directories.
Signed-off-by:
Jason Edmeades
<
us@edmeades.me.uk
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8a84148e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
xcopy.c
programs/xcopy/tests/xcopy.c
+0
-1
xcopy.c
programs/xcopy/xcopy.c
+7
-6
No files found.
programs/xcopy/tests/xcopy.c
View file @
c8fcedcf
...
...
@@ -103,7 +103,6 @@ static void test_parms_syntax(void)
rc
=
runcmd
(
"xcopy /D/S/E xcopytest xcopytest2
\\
"
);
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 @
c8fcedcf
...
...
@@ -590,6 +590,13 @@ static int XCOPY_DoCopy(WCHAR *srcstem, WCHAR *srcspec,
/* Search 2 - do subdirs */
if
(
flags
&
OPT_RECURSIVE
)
{
/* If /E is supplied, create the directory now */
if
((
flags
&
OPT_EMPTYDIR
)
&&
!
(
flags
&
OPT_SIMULATE
))
{
XCOPY_CreateDirectory
(
deststem
);
}
lstrcpyW
(
inputpath
,
srcstem
);
lstrcatW
(
inputpath
,
wchr_star
);
findres
=
TRUE
;
...
...
@@ -613,12 +620,6 @@ static int XCOPY_DoCopy(WCHAR *srcstem, WCHAR *srcspec,
lstrcpyW
(
outputpath
,
deststem
);
if
(
*
destspec
==
0x00
)
{
lstrcatW
(
outputpath
,
finddata
->
cFileName
);
/* If /E is supplied, create the directory now */
if
((
flags
&
OPT_EMPTYDIR
)
&&
!
(
flags
&
OPT_SIMULATE
))
XCOPY_CreateDirectory
(
outputpath
);
lstrcatW
(
outputpath
,
wchr_slash
);
}
...
...
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