* spawn.cc (spawn_guts): Only try to remove long path prefix from
runpath if runpath is not NULL.
This commit is contained in:
parent
aced35f883
commit
27ac64346f
|
@ -1,3 +1,8 @@
|
||||||
|
2010-01-25 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* spawn.cc (spawn_guts): Only try to remove long path prefix from
|
||||||
|
runpath if runpath is not NULL.
|
||||||
|
|
||||||
2010-01-25 Corinna Vinschen <corinna@vinschen.de>
|
2010-01-25 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* nlsfuncs.cc (__get_lcid_from_locale): Fix a comment. Handle special
|
* nlsfuncs.cc (__get_lcid_from_locale): Fix a comment. Handle special
|
||||||
|
|
|
@ -489,23 +489,24 @@ spawn_guts (const char *prog_arg, const char *const *argv,
|
||||||
}
|
}
|
||||||
|
|
||||||
runpath = null_app_name ? NULL : real_path.get_wide_win32_path (runpath);
|
runpath = null_app_name ? NULL : real_path.get_wide_win32_path (runpath);
|
||||||
{ /* If the executable path length is < MAX_PATH, make sure the long path
|
if (runpath)
|
||||||
win32 prefix is removed from the path to make subsequent native Win32
|
{ /* If the executable path length is < MAX_PATH, make sure the long path
|
||||||
child processes happy which are not long path aware. */
|
win32 prefix is removed from the path to make subsequent native Win32
|
||||||
USHORT len = real_path.get_nt_native_path ()->Length;
|
child processes happy which are not long path aware. */
|
||||||
if (len < (MAX_PATH + 4) * sizeof (WCHAR)
|
USHORT len = real_path.get_nt_native_path ()->Length;
|
||||||
|| (runpath[5] != L':' /* UNC path */
|
if (len < (MAX_PATH + 4) * sizeof (WCHAR)
|
||||||
&& len < (MAX_PATH + 6) * sizeof (WCHAR)))
|
|| (runpath[5] != L':' /* UNC path */
|
||||||
{
|
&& len < (MAX_PATH + 6) * sizeof (WCHAR)))
|
||||||
PWCHAR r = runpath + 4;
|
{
|
||||||
if (r[1] != L':') /* UNC path */
|
PWCHAR r = runpath + 4;
|
||||||
*(r += 2) = L'\\';
|
if (r[1] != L':') /* UNC path */
|
||||||
if (!RtlIsDosDeviceName_U (r))
|
*(r += 2) = L'\\';
|
||||||
runpath = r;
|
if (!RtlIsDosDeviceName_U (r))
|
||||||
else if (*r == L'\\')
|
runpath = r;
|
||||||
*r = L'C';
|
else if (*r == L'\\')
|
||||||
}
|
*r = L'C';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
syscall_printf ("null_app_name %d (%W, %.9500W)", null_app_name,
|
syscall_printf ("null_app_name %d (%W, %.9500W)", null_app_name,
|
||||||
runpath, wone_line);
|
runpath, wone_line);
|
||||||
|
|
Loading…
Reference in New Issue