server.c (run_shell): Quote directory name passed to cd.

2009-03-27  Sandra Loosemore  <sandra@codesourcery.com>

	fixincludes/
	* server.c (run_shell): Quote directory name passed to cd.

From-SVN: r145131
This commit is contained in:
Sandra Loosemore 2009-03-27 17:56:01 -04:00 committed by Sandra Loosemore
parent 7338ea632b
commit ea7557f04b
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2009-03-27 Sandra Loosemore <sandra@codesourcery.com>
* server.c (run_shell): Quote directory name passed to cd.
2009-03-01 Bruce Korb <bkorb@gnu.org>
Apply a positively ancient patch:

View File

@ -266,7 +266,7 @@ run_shell (const char* pz_cmd)
/* Make sure the process will pay attention to us, send the
supplied command, and then have it output a special marker that
we can find. */
fprintf (server_pair.pf_write, "cd %s\n%s\n\necho\necho %s\n",
fprintf (server_pair.pf_write, "cd \"%s\"\n%s\n\necho\necho %s\n",
p_cur_dir, pz_cmd, z_done);
fflush (server_pair.pf_write);