VirtualBox

Ignore:
Timestamp:
Nov 10, 2009 4:10:31 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: Regression fix: Save mediums mounted at runtime.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r24557 r24559  
    24032403
    24042404    /* Remount medium to the predefined port/device */
     2405    bool wasMounted = false;
    24052406    machine.MountMedium (target.name, target.port, target.device, newId, false /* force */);
    2406     if (!machine.isOk())
     2407    if (machine.isOk())
     2408        wasMounted = true;
     2409    else
    24072410    {
    24082411        /* Ask for force remounting */
     
    24112414            /* Force remount medium to the predefined port/device. */
    24122415            machine.MountMedium (target.name, target.port, target.device, newId, true /* force */);
    2413             if (!machine.isOk())
     2416            if (machine.isOk())
     2417                wasMounted = true;
     2418            else
    24142419                vboxProblem().cannotRemountMedium (this, machine, vboxGlobal().findMedium (mount ? newId : currentId), mount, false /* retry? */);
    24152420        }
     2421    }
     2422
     2423    /* Save medium mounted at runtime */
     2424    if (wasMounted && mIsAutoSaveMedia)
     2425    {
     2426        machine.SaveSettings();
     2427        if (!machine.isOk())
     2428            vboxProblem().cannotSaveMachineSettings (machine);
    24162429    }
    24172430}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette