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
203c538a
Commit
203c538a
authored
Oct 03, 2009
by
Andrew Nguyen
Committed by
Alexandre Julliard
Oct 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Fix copy option handling in batch mode.
parent
95eb435a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
builtins.c
programs/cmd/builtins.c
+14
-2
No files found.
programs/cmd/builtins.c
View file @
203c538a
...
...
@@ -171,7 +171,7 @@ void WCMD_copy (void) {
WIN32_FIND_DATA
fd
;
HANDLE
hff
;
BOOL
force
,
status
;
WCHAR
outpath
[
MAX_PATH
],
srcpath
[
MAX_PATH
],
copycmd
[
3
];
WCHAR
outpath
[
MAX_PATH
],
srcpath
[
MAX_PATH
],
copycmd
[
4
];
DWORD
len
;
static
const
WCHAR
copyCmdW
[]
=
{
'C'
,
'O'
,
'P'
,
'Y'
,
'C'
,
'M'
,
'D'
,
'\0'
};
BOOL
copyToDir
=
FALSE
;
...
...
@@ -238,8 +238,20 @@ void WCMD_copy (void) {
else
if
(
strstrW
(
quals
,
parmY
))
force
=
TRUE
;
else
{
/* By default, we will force the overwrite in batch mode and ask for
* confirmation in interactive mode. */
force
=
!!
context
;
/* If COPYCMD is set, then we force the overwrite with /Y and ask for
* confirmation with /-Y. If COPYCMD is neither of those, then we use the
* default behavior. */
len
=
GetEnvironmentVariable
(
copyCmdW
,
copycmd
,
sizeof
(
copycmd
)
/
sizeof
(
WCHAR
));
force
=
(
len
&&
len
<
(
sizeof
(
copycmd
)
/
sizeof
(
WCHAR
))
&&
!
lstrcmpiW
(
copycmd
,
parmY
));
if
(
len
&&
len
<
(
sizeof
(
copycmd
)
/
sizeof
(
WCHAR
)))
{
if
(
!
lstrcmpiW
(
copycmd
,
parmY
))
force
=
TRUE
;
else
if
(
!
lstrcmpiW
(
copycmd
,
parmNoY
))
force
=
FALSE
;
}
}
/* Loop through all source files */
...
...
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