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
5c8c694e
Commit
5c8c694e
authored
Mar 08, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Mar 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Wildcards in directory names for CD.
parent
eb6d084f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
builtins.c
programs/cmd/builtins.c
+33
-0
No files found.
programs/cmd/builtins.c
View file @
5c8c694e
...
...
@@ -1051,6 +1051,8 @@ void WCMD_setshow_default (char *command) {
BOOL
status
;
char
string
[
1024
];
char
*
pos
;
WIN32_FIND_DATA
fd
;
HANDLE
hff
;
WINE_TRACE
(
"Request change to directory '%s'
\n
"
,
command
);
if
(
strlen
(
command
)
==
0
)
{
...
...
@@ -1068,6 +1070,37 @@ void WCMD_setshow_default (char *command) {
}
*
pos
=
0x00
;
/* Search for approprate directory */
WINE_TRACE
(
"Looking for directory '%s'
\n
"
,
string
);
hff
=
FindFirstFile
(
string
,
&
fd
);
while
(
hff
!=
INVALID_HANDLE_VALUE
)
{
if
(
fd
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
{
char
fpath
[
MAX_PATH
];
char
drive
[
10
];
char
dir
[
MAX_PATH
];
char
fname
[
MAX_PATH
];
char
ext
[
MAX_PATH
];
/* Convert path into actual directory spec */
GetFullPathName
(
string
,
sizeof
(
fpath
),
fpath
,
NULL
);
WCMD_splitpath
(
fpath
,
drive
,
dir
,
fname
,
ext
);
/* Rebuild path */
sprintf
(
string
,
"%s%s%s"
,
drive
,
dir
,
fd
.
cFileName
);
FindClose
(
hff
);
hff
=
INVALID_HANDLE_VALUE
;
break
;
}
/* Step on to next match */
if
(
FindNextFile
(
hff
,
&
fd
)
==
0
)
{
FindClose
(
hff
);
hff
=
INVALID_HANDLE_VALUE
;
break
;
}
}
/* Change to that directory */
WINE_TRACE
(
"Really changing to directory '%s'
\n
"
,
string
);
status
=
SetCurrentDirectory
(
string
);
...
...
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