diff --git a/checkin_notes b/checkin_notes index eb92e2ad40..354c638533 100644 --- a/checkin_notes +++ b/checkin_notes @@ -7608,3 +7608,13 @@ Charlie 21 Oct 2011 sg_BoincSimpleFrame.cpp,.h sg_DlgMessages.cpp,.h sg_DlgPreferences.cpp,.h + +Rom 21 Oct 2011 + - VBOX: Don't redirect VirtualBox to a different directory structure for + the root configuration file when the client is NOT in sandbox mode. + Doing so could cause confusion if the volunteer uses VirtualBox for + any of their own work. If BOINC started up first it would have appeared + that their own VM's no longer existed. + + samples/vboxwrapper/ + vbox.cpp diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp index 76905524cb..063aca7cc2 100644 --- a/samples/vboxwrapper/vbox.cpp +++ b/samples/vboxwrapper/vbox.cpp @@ -416,29 +416,31 @@ int VBOX_VM::initialize() { // Set the location in which the VirtualBox Configuration files can be // stored for this instance. // - virtualbox_user_home = aid.project_dir; - virtualbox_user_home += "/../virtualbox"; + if (aid.using_sandbox) { + virtualbox_user_home = aid.project_dir; + virtualbox_user_home += "/../virtualbox"; - if (!boinc_file_exists(virtualbox_user_home.c_str())) boinc_mkdir(virtualbox_user_home.c_str()); + if (!boinc_file_exists(virtualbox_user_home.c_str())) boinc_mkdir(virtualbox_user_home.c_str()); #ifdef _WIN32 - if (!SetEnvironmentVariable("VBOX_USER_HOME", const_cast(virtualbox_user_home.c_str()))) { - fprintf( - stderr, - "%s Failed to modify the search path.\n", - boinc_msg_prefix(buf, sizeof(buf)) - ); - } + if (!SetEnvironmentVariable("VBOX_USER_HOME", const_cast(virtualbox_user_home.c_str()))) { + fprintf( + stderr, + "%s Failed to modify the search path.\n", + boinc_msg_prefix(buf, sizeof(buf)) + ); + } #else - // putenv does not copy its input buffer, so we must use setenv - if (setenv("VBOX_USER_HOME", const_cast(virtualbox_user_home.c_str()), 1)) { - fprintf( - stderr, - "%s Failed to modify the VBOX_USER_HOME path.\n", - boinc_msg_prefix(buf, sizeof(buf)) - ); - } + // putenv does not copy its input buffer, so we must use setenv + if (setenv("VBOX_USER_HOME", const_cast(virtualbox_user_home.c_str()), 1)) { + fprintf( + stderr, + "%s Failed to modify the VBOX_USER_HOME path.\n", + boinc_msg_prefix(buf, sizeof(buf)) + ); + } #endif + } return 0; }