Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
eb6d084f
Commit
eb6d084f
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: Support unquoted directories in CD command.
parent
b9265bc3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
builtins.c
programs/cmd/builtins.c
+16
-3
wcmd.h
programs/cmd/wcmd.h
+1
-1
wcmdmain.c
programs/cmd/wcmdmain.c
+1
-1
No files found.
programs/cmd/builtins.c
View file @
eb6d084f
...
@@ -1046,18 +1046,31 @@ void WCMD_setshow_attrib (void) {
...
@@ -1046,18 +1046,31 @@ void WCMD_setshow_attrib (void) {
* Set/Show the current default directory
* Set/Show the current default directory
*/
*/
void
WCMD_setshow_default
(
voi
d
)
{
void
WCMD_setshow_default
(
char
*
comman
d
)
{
BOOL
status
;
BOOL
status
;
char
string
[
1024
];
char
string
[
1024
];
char
*
pos
;
if
(
strlen
(
param1
)
==
0
)
{
WINE_TRACE
(
"Request change to directory '%s'
\n
"
,
command
);
if
(
strlen
(
command
)
==
0
)
{
GetCurrentDirectory
(
sizeof
(
string
),
string
);
GetCurrentDirectory
(
sizeof
(
string
),
string
);
strcat
(
string
,
"
\n
"
);
strcat
(
string
,
"
\n
"
);
WCMD_output
(
string
);
WCMD_output
(
string
);
}
}
else
{
else
{
status
=
SetCurrentDirectory
(
param1
);
/* Remove any double quotes, which may be in the
middle, eg. cd "C:\Program Files"\Microsoft is ok */
pos
=
string
;
while
(
*
command
)
{
if
(
*
command
!=
'"'
)
*
pos
++
=
*
command
;
command
++
;
}
*
pos
=
0x00
;
/* Change to that directory */
WINE_TRACE
(
"Really changing to directory '%s'
\n
"
,
string
);
status
=
SetCurrentDirectory
(
string
);
if
(
!
status
)
{
if
(
!
status
)
{
WCMD_print_error
();
WCMD_print_error
();
return
;
return
;
...
...
programs/cmd/wcmd.h
View file @
eb6d084f
...
@@ -63,7 +63,7 @@ void WCMD_run_program (char *command, int called);
...
@@ -63,7 +63,7 @@ void WCMD_run_program (char *command, int called);
void
WCMD_setlocal
(
const
char
*
command
);
void
WCMD_setlocal
(
const
char
*
command
);
void
WCMD_setshow_attrib
(
void
);
void
WCMD_setshow_attrib
(
void
);
void
WCMD_setshow_date
(
void
);
void
WCMD_setshow_date
(
void
);
void
WCMD_setshow_default
(
voi
d
);
void
WCMD_setshow_default
(
char
*
comman
d
);
void
WCMD_setshow_env
(
char
*
command
);
void
WCMD_setshow_env
(
char
*
command
);
void
WCMD_setshow_path
(
char
*
command
);
void
WCMD_setshow_path
(
char
*
command
);
void
WCMD_setshow_prompt
(
void
);
void
WCMD_setshow_prompt
(
void
);
...
...
programs/cmd/wcmdmain.c
View file @
eb6d084f
...
@@ -543,7 +543,7 @@ void WCMD_process_command (char *command)
...
@@ -543,7 +543,7 @@ void WCMD_process_command (char *command)
break
;
break
;
case
WCMD_CD
:
case
WCMD_CD
:
case
WCMD_CHDIR
:
case
WCMD_CHDIR
:
WCMD_setshow_default
();
WCMD_setshow_default
(
p
);
break
;
break
;
case
WCMD_CLS
:
case
WCMD_CLS
:
WCMD_clear_screen
();
WCMD_clear_screen
();
...
...
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