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
61c3bb03
Commit
61c3bb03
authored
Mar 26, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Mar 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: Error out of CreateProcess if the specified current directory
doesn't exist.
parent
94dcabec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
process.c
dlls/kernel/process.c
+5
-1
process.c
dlls/kernel/tests/process.c
+12
-0
No files found.
dlls/kernel/process.c
View file @
61c3bb03
...
...
@@ -1661,7 +1661,11 @@ BOOL WINAPI CreateProcessW( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_ATTRIB
if
(
cur_dir
)
{
unixdir
=
wine_get_unix_file_name
(
cur_dir
);
if
(
!
(
unixdir
=
wine_get_unix_file_name
(
cur_dir
)))
{
SetLastError
(
ERROR_DIRECTORY
);
goto
done
;
}
}
else
{
...
...
dlls/kernel/tests/process.c
View file @
61c3bb03
...
...
@@ -811,6 +811,18 @@ static void test_Directory(void)
okChildIString
(
"Misc"
,
"CurrDirA"
,
windir
);
release_memory
();
assert
(
DeleteFileA
(
resfile
)
!=
0
);
/* search PATH for the exe if directory is NULL */
ok
(
CreateProcessA
(
NULL
,
"winver.exe"
,
NULL
,
NULL
,
FALSE
,
0L
,
NULL
,
NULL
,
&
startup
,
&
info
),
"CreateProcess
\n
"
);
ok
(
TerminateProcess
(
info
.
hProcess
,
0
),
"Child process termination
\n
"
);
/* if any directory is provided, don't search PATH, error on bad directory */
SetLastError
(
0xdeadbeef
);
memset
(
&
info
,
0
,
sizeof
(
info
));
ok
(
!
CreateProcessA
(
NULL
,
"winver.exe"
,
NULL
,
NULL
,
FALSE
,
0L
,
NULL
,
"non
\\
existent
\\
directory"
,
&
startup
,
&
info
),
"CreateProcess
\n
"
);
ok
(
GetLastError
()
==
ERROR_DIRECTORY
,
"Expected ERROR_DIRECTORY, got %ld
\n
"
,
GetLastError
());
ok
(
!
TerminateProcess
(
info
.
hProcess
,
0
),
"Child process should not exist
\n
"
);
}
static
BOOL
is_str_env_drive_dir
(
const
char
*
str
)
...
...
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