X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=netinstall%2Froot.cc;fp=netinstall%2Froot.cc;h=8c371753c9fe09c853a78879ae257f1510aa01a1;hb=426fe636212336bb32a5e6f187c4d623709fa57d;hp=fb09b60390a74e13d68aaa6dd28324e5847de337;hpb=21db8709c0c2dcedbd278c7fe571290d5ce80a71;p=chise%2Fxemacs-chise.git- diff --git a/netinstall/root.cc b/netinstall/root.cc index fb09b60..8c37175 100644 --- a/netinstall/root.cc +++ b/netinstall/root.cc @@ -137,32 +137,6 @@ change_default_root (int id) } } -static void -read_mount_table () -{ - int isnative, issystem; - root_dir = find_root_location (&issystem, &isnative); - if (root_dir) - { - if (isnative) - install_type = IDC_INSTALL_NATIVE; - else - install_type = IDC_INSTALL_CYGWIN; - - if (issystem) - root_scope = IDC_ROOT_SYSTEM; - else - root_scope = IDC_ROOT_USER; - root_dir_default = 0; - } - else - { - change_default_root (IDC_INSTALL_NATIVE); - root_scope = (is_admin()) ? IDC_ROOT_SYSTEM : IDC_ROOT_USER; - root_dir_default = 1; - } -} - static int CALLBACK browse_cb (HWND h, UINT m, LPARAM lp, LPARAM data) { @@ -317,11 +291,21 @@ dialog_proc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) return FALSE; } +static void +set_default_root () +{ + change_default_root (IDC_INSTALL_NATIVE); + root_scope = (is_admin()) ? IDC_ROOT_SYSTEM : IDC_ROOT_USER; + root_dir_default = 1; +} + void do_root (HINSTANCE h) { int rv = 0; - read_mount_table (); + // init will have read a previous root + if (!root_dir) + set_default_root (); rv = DialogBox (h, MAKEINTRESOURCE (IDD_ROOT), 0, dialog_proc); if (rv == -1)