Commit c0917202 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(sys_subshell) [MSDOS]: If PWD is set in the

environment, pass it down with corrected value.
parent 54679108
2002-03-04 Eli Zaretskii <eliz@is.elta.co.il>
* sysdep.c (sys_subshell) [MSDOS]: If PWD is set in the
environment, pass it down with corrected value.
2002-03-04 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
 
* lread.c (read_filtered_event): Do not call start_hourglass
......
......@@ -850,8 +850,22 @@ sys_subshell ()
#endif
#ifdef MSDOS /* Demacs 1.1.2 91/10/20 Manabu Higashida */
st = system (sh);
chdir (oldwd);
{
char *old_pwd = getenv ("PWD");
/* If PWD is set, pass it with corrected value. */
if (old_pwd)
{
old_pwd = xstrdup (old_pwd);
if (str[len - 1] == '/')
str[len - 1] = '\0';
setenv ("PWD", str, 1);
}
st = system (sh);
chdir (oldwd);
if (old_pwd)
putenv (old_pwd); /* restore previous value */
}
#if 0 /* This is also reported if last command executed in subshell failed, KFS */
if (st)
report_file_error ("Can't execute subshell", Fcons (build_string (sh), Qnil));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment