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
87f02936
Commit
87f02936
authored
Mar 13, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Mar 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Make SET have correct errorlevel.
parent
4b1ef917
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
builtins.c
programs/cmd/builtins.c
+7
-1
No files found.
programs/cmd/builtins.c
View file @
87f02936
...
...
@@ -1278,6 +1278,7 @@ void WCMD_setshow_env (char *s) {
char
*
p
;
int
status
;
errorlevel
=
0
;
if
(
param1
[
0
]
==
0x00
&&
quals
[
0
]
==
0x00
)
{
env
=
GetEnvironmentStrings
();
WCMD_setshow_sortenv
(
env
,
NULL
);
...
...
@@ -1314,11 +1315,13 @@ void WCMD_setshow_env (char *s) {
}
}
else
{
DWORD
gle
;
p
=
strchr
(
s
,
'='
);
if
(
p
==
NULL
)
{
env
=
GetEnvironmentStrings
();
if
(
WCMD_setshow_sortenv
(
env
,
s
)
==
0
)
{
WCMD_output
(
"Environment variable %s not defined
\n
"
,
s
);
errorlevel
=
1
;
}
return
;
}
...
...
@@ -1326,7 +1329,10 @@ void WCMD_setshow_env (char *s) {
if
(
strlen
(
p
)
==
0
)
p
=
NULL
;
status
=
SetEnvironmentVariable
(
s
,
p
);
if
((
!
status
)
&
(
GetLastError
()
!=
ERROR_ENVVAR_NOT_FOUND
))
WCMD_print_error
();
gle
=
GetLastError
();
if
((
!
status
)
&
(
gle
==
ERROR_ENVVAR_NOT_FOUND
))
{
errorlevel
=
1
;
}
else
if
((
!
status
))
WCMD_print_error
();
}
}
...
...
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