VirtualBox

Changeset 91130 in vbox


Ignore:
Timestamp:
Sep 6, 2021 7:00:34 PM (3 years ago)
Author:
vboxsync
Message:

Main/Machine: Allow specifying the empty string as the new location, which means the same as moving to the current location (which may move files other than the VM config).

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r90828 r91130  
    90799079      <desc>
    90809080        Move machine on to new place/folder
    9081         <result name="E_INVALIDARG">
    9082           @a target is @c null.
    9083         </result>
    90849081      </desc>
    90859082
    90869083      <param name="folder" type="wstring" dir="in">
    9087         <desc>Target folder where machine is moved.</desc>
     9084        <desc>Target folder where machine is moved. May be the same folder
     9085          where the VM already is located or the empty string, in which
     9086          case the machine is kept in this location and the disk images
     9087          and other files which are stored elsewhere are moved.</desc>
    90889088      </param>
    90899089
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r90828 r91130  
    69756975    if (SUCCEEDED(hrc))
    69766976    {
     6977        com::Utf8Str strDefaultPath;
     6978        if (aTargetPath.isEmpty())
     6979            i_calculateFullPath(".", strDefaultPath);
     6980
    69776981        /* Initialize our worker task */
    69786982        MachineMoveVM *pTask = NULL;
    69796983        try
    69806984        {
    6981             pTask = new MachineMoveVM(this, aTargetPath, aType, ptrProgress);
     6985            pTask = new MachineMoveVM(this, aTargetPath.isEmpty() ? strDefaultPath : aTargetPath, aType, ptrProgress);
    69826986        }
    69836987        catch (std::bad_alloc &)
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