From ea7557f04b00f388a1042e1c6e38ea0da17a1b93 Mon Sep 17 00:00:00 2001
From: Sandra Loosemore <sandra@codesourcery.com>
Date: Fri, 27 Mar 2009 17:56:01 -0400
Subject: [PATCH] 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
---
 fixincludes/ChangeLog | 4 ++++
 fixincludes/server.c  | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index cef28bd7d3ff..0db98af7ded2 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -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:
 
diff --git a/fixincludes/server.c b/fixincludes/server.c
index 6db8cf7e101a..1e50efc9faaf 100644
--- a/fixincludes/server.c
+++ b/fixincludes/server.c
@@ -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);
 
-- 
GitLab