Mercurial > hg > xemacs-beta
diff netinstall/root.cc @ 657:ce0b3f2eff35
[xemacs-hg @ 2001-09-09 04:37:41 by andyp]
DDE, netinstall and cygwin file fixes
author | andyp |
---|---|
date | Sun, 09 Sep 2001 04:37:48 +0000 |
parents | 3d3049ae1304 |
children |
line wrap: on
line diff
--- a/netinstall/root.cc Sat Sep 08 09:12:09 2001 +0000 +++ b/netinstall/root.cc Sun Sep 09 04:37:48 2001 +0000 @@ -137,32 +137,6 @@ } } -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 @@ 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)