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
f6ec4417
Commit
f6ec4417
authored
Feb 28, 2007
by
Alexander Farber
Committed by
Alexandre Julliard
Mar 01, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Support /-Y and COPYCMD environment variable in the "copy" builtin.
parent
fdeb6d5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
builtins.c
programs/cmd/builtins.c
+12
-2
No files found.
programs/cmd/builtins.c
View file @
f6ec4417
...
@@ -110,7 +110,8 @@ WIN32_FIND_DATA fd;
...
@@ -110,7 +110,8 @@ WIN32_FIND_DATA fd;
HANDLE
hff
;
HANDLE
hff
;
BOOL
force
,
status
;
BOOL
force
,
status
;
static
const
char
overwrite
[]
=
"Overwrite file (Y/N)?"
;
static
const
char
overwrite
[]
=
"Overwrite file (Y/N)?"
;
char
string
[
8
],
outpath
[
MAX_PATH
],
inpath
[
MAX_PATH
],
*
infile
;
char
string
[
8
],
outpath
[
MAX_PATH
],
inpath
[
MAX_PATH
],
*
infile
,
copycmd
[
3
];
DWORD
len
;
if
(
param1
[
0
]
==
0x00
)
{
if
(
param1
[
0
]
==
0x00
)
{
WCMD_output
(
"Argument missing
\n
"
);
WCMD_output
(
"Argument missing
\n
"
);
...
@@ -140,7 +141,16 @@ char string[8], outpath[MAX_PATH], inpath[MAX_PATH], *infile;
...
@@ -140,7 +141,16 @@ char string[8], outpath[MAX_PATH], inpath[MAX_PATH], *infile;
FindClose
(
hff
);
FindClose
(
hff
);
}
}
force
=
(
strstr
(
quals
,
"/Y"
)
!=
NULL
);
/* /-Y has the highest priority, then /Y and finally the COPYCMD env. variable */
if
(
strstr
(
quals
,
"/-Y"
))
force
=
FALSE
;
else
if
(
strstr
(
quals
,
"/Y"
))
force
=
TRUE
;
else
{
len
=
GetEnvironmentVariable
(
"COPYCMD"
,
copycmd
,
sizeof
(
copycmd
));
force
=
(
len
&&
len
<
sizeof
(
copycmd
)
&&
!
lstrcmpi
(
copycmd
,
"/Y"
));
}
if
(
!
force
)
{
if
(
!
force
)
{
hff
=
FindFirstFile
(
outpath
,
&
fd
);
hff
=
FindFirstFile
(
outpath
,
&
fd
);
if
(
hff
!=
INVALID_HANDLE_VALUE
)
{
if
(
hff
!=
INVALID_HANDLE_VALUE
)
{
...
...
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