Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions samples/vboxwrapper/vbox_vboxmanage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.

#ifdef _WIN32
#include <algorithm>
#include "boinc_win.h"
#include "win_util.h"
#else
Expand Down Expand Up @@ -532,12 +533,20 @@ namespace vboxmanage {
string medium_file = aid.project_dir;
medium_file += "/" + multiattach_vdi_file;

#ifdef _WIN32
replace(medium_file.begin(), medium_file.end(), '\\', '/');
#endif

vboxlog_msg("Adding virtual disk drive to VM. (%s)", multiattach_vdi_file.c_str());
command = "list hdds";

retval = vbm_popen(command, output, "check if parent hdd is registered", false, false);
if (retval) return retval;

#ifdef _WIN32
replace(output.begin(), output.end(), '\\', '/');
#endif

if (output.find(medium_file) == string::npos) {
// parent hdd is not registered
// vdi files can't be registered and set to multiattach mode within 1 step.
Expand Down