VirtualBox

Changeset 18775 in vbox for trunk


Ignore:
Timestamp:
Apr 6, 2009 3:19:22 PM (16 years ago)
Author:
vboxsync
Message:

FE/VBoxManage-OVF: use absolute paths, cause the disk handling is based on the ovf file path

File:
1 edited

Legend:

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

    r18754 r18775  
    4343#include <iprt/getopt.h>
    4444#include <iprt/ctype.h>
     45#include <iprt/path.h>
    4546
    4647#include <VBox/log.h>
     
    215216    do
    216217    {
    217         Bstr bstrOvfFilename(strOvfFilename);
    218218        ComPtr<IAppliance> pAppliance;
    219219        CHECK_ERROR_BREAK(a->virtualBox, CreateAppliance(pAppliance.asOutParam()));
    220220
    221         CHECK_ERROR_BREAK(pAppliance, Read(bstrOvfFilename));
     221        char *pszAbsFilePath = RTPathAbsDup(strOvfFilename.c_str());
     222        CHECK_ERROR_BREAK(pAppliance, Read(Bstr(pszAbsFilePath)));
     223        RTStrFree(pszAbsFilePath);
    222224
    223225        // call interpret(); this can yield both warnings and errors, so we need
     
    710712
    711713        ComPtr<IProgress> progress;
    712         CHECK_ERROR_BREAK(pAppliance, Write(Bstr("ovf-0.9"), Bstr(strOutputFile), progress.asOutParam()));
     714        char *pszAbsFilePath = RTPathAbsDup(strOutputFile.c_str());
     715        CHECK_ERROR_BREAK(pAppliance, Write(Bstr("ovf-0.9"), Bstr(pszAbsFilePath), progress.asOutParam()));
     716        RTStrFree(pszAbsFilePath);
    713717
    714718        showProgress(progress);
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