VirtualBox

Changeset 37896 in vbox


Ignore:
Timestamp:
Jul 12, 2011 12:56:22 PM (14 years ago)
Author:
vboxsync
Message:

Frontends/VBoxManage: proper relative path support for adoptstate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp

    r37602 r37896  
    622622    if (machine)
    623623    {
     624        char szStateFileAbs[RTPATH_MAX] = "";
     625        int vrc = RTPathAbs(a->argv[1], szStateFileAbs, sizeof(szStateFileAbs));
     626        if (RT_FAILURE(vrc))
     627        {
     628            RTMsgError("Cannot convert filename \"%s\" to absolute path", a->argv[0]);
     629            return 1;
     630        }
     631
    624632        do
    625633        {
     
    630638                ComPtr<IConsole> console;
    631639                CHECK_ERROR_BREAK(a->session, COMGETTER(Console)(console.asOutParam()));
    632                 CHECK_ERROR_BREAK(console, AdoptSavedState(Bstr(a->argv[1]).raw()));
     640                CHECK_ERROR_BREAK(console, AdoptSavedState(Bstr(szStateFileAbs).raw()));
    633641            } while (0);
    634642            CHECK_ERROR_BREAK(a->session, UnlockMachine());
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