diff src/callproc.c @ 91551:f14242124fd7

* process.c (Fstart_process): * callproc.c (Fcall_process): Handle the case where Funhandled_file_name_directory returns nil.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 06 Feb 2008 03:16:10 +0000
parents c70e45a7acfd
children 8971ddf55736
line wrap: on
line diff
--- a/src/callproc.c	Wed Feb 06 03:14:46 2008 +0000
+++ b/src/callproc.c	Wed Feb 06 03:16:10 2008 +0000
@@ -376,9 +376,12 @@
 
     GCPRO4 (infile, buffer, current_dir, error_file);
 
-    current_dir
-      = expand_and_dir_to_file (Funhandled_file_name_directory (current_dir),
-				Qnil);
+    current_dir = Funhandled_file_name_directory (current_dir);
+    if (NILP (current_dir))
+      /* If the file name handler says that current_dir is unreachable, use
+	 a sensible default. */
+      current_dir = build_string ("~/");
+    current_dir = expand_and_dir_to_file (current_dir, Qnil);
     if (NILP (Ffile_accessible_directory_p (current_dir)))
       report_file_error ("Setting current directory",
 			 Fcons (current_buffer->directory, Qnil));