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
409368eb
Commit
409368eb
authored
Feb 27, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Feb 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Prompt during del *.* and del *.
parent
fda7229b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
3 deletions
+33
-3
batch.c
programs/cmd/batch.c
+3
-3
builtins.c
programs/cmd/builtins.c
+29
-0
wcmd.h
programs/cmd/wcmd.h
+1
-0
No files found.
programs/cmd/batch.c
View file @
409368eb
...
...
@@ -230,8 +230,8 @@ char *p;
return
p
;
}
/* _splitpath - copied from winefile as no obvious way to use it otherwise */
void
_splitpath
(
const
CHAR
*
path
,
CHAR
*
drv
,
CHAR
*
dir
,
CHAR
*
name
,
CHAR
*
ext
)
/*
WCMD
_splitpath - copied from winefile as no obvious way to use it otherwise */
void
WCMD
_splitpath
(
const
CHAR
*
path
,
CHAR
*
drv
,
CHAR
*
dir
,
CHAR
*
name
,
CHAR
*
ext
)
{
const
CHAR
*
end
;
/* end of processed string */
const
CHAR
*
p
;
/* search pointer */
...
...
@@ -528,7 +528,7 @@ void WCMD_HandleTildaModifiers(char **start, char *forVariable) {
if
(
finaloutput
[
0
]
!=
0x00
)
strcat
(
finaloutput
,
" "
);
/* Split into components */
_splitpath
(
fullfilename
,
drive
,
dir
,
fname
,
ext
);
WCMD
_splitpath
(
fullfilename
,
drive
,
dir
,
fname
,
ext
);
/* 5. Handle 'd' : Drive Letter */
if
(
memchr
(
firstModifier
,
'd'
,
modifierLen
)
!=
NULL
)
{
...
...
programs/cmd/builtins.c
View file @
409368eb
...
...
@@ -237,6 +237,35 @@ char *p;
WCMD_output
(
"Argument missing
\n
"
);
return
;
}
/* If filename part of parameter is * or *.*, prompt unless
/Q supplied. */
if
(
strstr
(
quals
,
"/Q"
)
==
NULL
)
{
char
drive
[
10
];
char
dir
[
MAX_PATH
];
char
fname
[
MAX_PATH
];
char
ext
[
MAX_PATH
];
/* Convert path into actual directory spec */
GetFullPathName
(
param1
,
sizeof
(
fpath
),
fpath
,
NULL
);
WCMD_splitpath
(
fpath
,
drive
,
dir
,
fname
,
ext
);
/* Only prompt for * and *.*, not *a, a*, *.a* etc */
if
((
strcmp
(
fname
,
"*"
)
==
0
)
&&
(
*
ext
==
0x00
||
(
strcmp
(
ext
,
".*"
)
==
0
)))
{
BOOL
ok
;
char
question
[
MAXSTRING
];
/* Ask for confirmation */
sprintf
(
question
,
"%s, "
,
fpath
);
ok
=
WCMD_ask_confirm
(
question
);
/* Abort if answer is 'N' */
if
(
!
ok
)
return
;
}
}
hff
=
FindFirstFile
(
param1
,
&
fd
);
if
(
hff
==
INVALID_HANDLE_VALUE
)
{
WCMD_output
(
"%s :File Not Found
\n
"
,
param1
);
...
...
programs/cmd/wcmd.h
View file @
409368eb
...
...
@@ -82,6 +82,7 @@ void WCMD_opt_s_strip_quotes(char *cmd);
void
WCMD_HandleTildaModifiers
(
char
**
start
,
char
*
forVariable
);
BOOL
WCMD_ask_confirm
(
char
*
message
);
void
WCMD_splitpath
(
const
CHAR
*
path
,
CHAR
*
drv
,
CHAR
*
dir
,
CHAR
*
name
,
CHAR
*
ext
);
/* Data structure to hold context when executing batch 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