diff netinstall/localdir.cc @ 673:685b588e92d8

[xemacs-hg @ 2001-10-30 05:13:26 by andyp] merge of windows 21.4.5 codeline
author andyp
date Tue, 30 Oct 2001 05:13:31 +0000
parents 3078fd1074e8
children
line wrap: on
line diff
--- a/netinstall/localdir.cc	Fri Oct 26 02:42:53 2001 +0000
+++ b/netinstall/localdir.cc	Tue Oct 30 05:13:31 2001 +0000
@@ -12,6 +12,7 @@
  * Written by Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>
  * based on work and suggestions of DJ Delorie
  *
+ * Sync'ed with cinstall 2001-10-16
  */
 
 /* The purpose of this file is to ask the user where they want the
@@ -23,7 +24,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
+#include <io.h>
 
+#include "mkdir.h"
 #include "dialog.h"
 #include "resource.h"
 #include "state.h"
@@ -102,6 +105,11 @@
 
     case IDOK:
       save_dialog (h);
+      if (_access (local_dir, 0) != 0 && yesno (IDS_CREATE_DIR, local_dir) == IDYES)
+	{
+	  log (0, "Created install directory %s\n", local_dir);
+	  mkdir_p (1, local_dir);
+	}
       if (SetCurrentDirectoryA (local_dir))
 	{
 	  switch (source)
@@ -132,7 +140,6 @@
       NEXT (0);
       break;
     }
-  return FALSE;
 }
 
 static BOOL CALLBACK