diff src/fileio.c @ 386:4af0ddfb7c5b r21-2-8

Import from CVS: tag r21-2-8
author cvs
date Mon, 13 Aug 2007 11:08:50 +0200
parents 8626e4521993
children 74fd4e045ea6
line wrap: on
line diff
--- a/src/fileio.c	Mon Aug 13 11:08:25 2007 +0200
+++ b/src/fileio.c	Mon Aug 13 11:08:50 2007 +0200
@@ -981,8 +981,13 @@
       if (IS_DIRECTORY_SEP (nm[1])
 	  || nm[1] == 0)	/* ~ by itself */
 	{
-	  if (!(newdir = (Bufbyte *) get_home_directory()))
+	  char * newdir_external = get_home_directory ();
+
+	  if (newdir_external == NULL)
 	    newdir = (Bufbyte *) "";
+	  else
+	    GET_C_CHARPTR_INT_FILENAME_DATA_ALLOCA (newdir_external, newdir);
+
 	  nm++;
 #ifdef WINDOWSNT
 	  collapse_newdir = 0;
@@ -1255,8 +1260,7 @@
     }
   else
     {
-      if (!(IS_DIRECTORY_SEP (target[0]) && IS_DIRECTORY_SEP (target[1])))
-      abort ();
+      assert (IS_DIRECTORY_SEP (target[0]) && IS_DIRECTORY_SEP (target[1]));
     }
   CORRECT_DIR_SEPS (target);
 #endif /* WINDOWSNT */