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
44923347
Commit
44923347
authored
Mar 03, 2008
by
Jason Edmeades
Committed by
Alexandre Julliard
Mar 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Support cd .. when saving current directory.
parent
84f02a6a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
builtins.c
programs/cmd/builtins.c
+3
-0
wcmdmain.c
programs/cmd/wcmdmain.c
+3
-0
No files found.
programs/cmd/builtins.c
View file @
44923347
...
...
@@ -1865,6 +1865,9 @@ void WCMD_setshow_default (WCHAR *command) {
return
;
}
else
{
/* Save away the actual new directory, to store as current location */
GetCurrentDirectoryW
(
sizeof
(
string
)
/
sizeof
(
WCHAR
),
string
);
/* Restore old directory if drive letter would change, and
CD x:\directory /D (or pushd c:\directory) not supplied */
if
((
strstrW
(
quals
,
parmD
)
==
NULL
)
&&
...
...
programs/cmd/wcmdmain.c
View file @
44923347
...
...
@@ -419,6 +419,7 @@ int wmain (int argc, WCHAR *argvW[])
static
const
WCHAR
fmt
[]
=
{
'='
,
'%'
,
'c'
,
':'
,
'\0'
};
wsprintf
(
envvar
,
fmt
,
string
[
0
]);
SetEnvironmentVariable
(
envvar
,
string
);
WINE_TRACE
(
"Set %s to %s
\n
"
,
wine_dbgstr_w
(
envvar
),
wine_dbgstr_w
(
string
));
}
if
(
opt_k
)
{
...
...
@@ -643,7 +644,9 @@ void WCMD_execute (WCHAR *command, WCHAR *redirects,
if
(
GetEnvironmentVariable
(
envvar
,
dir
,
MAX_PATH
)
==
0
)
{
static
const
WCHAR
fmt
[]
=
{
'%'
,
's'
,
'\\'
,
'\0'
};
wsprintf
(
cmd
,
fmt
,
cmd
);
WINE_TRACE
(
"No special directory settings, using dir of %s
\n
"
,
wine_dbgstr_w
(
cmd
));
}
WINE_TRACE
(
"Got directory %s as %s
\n
"
,
wine_dbgstr_w
(
envvar
),
wine_dbgstr_w
(
cmd
));
status
=
SetCurrentDirectory
(
cmd
);
if
(
!
status
)
WCMD_print_error
();
HeapFree
(
GetProcessHeap
(),
0
,
cmd
);
...
...
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