VirtualBox

Ignore:
Timestamp:
Nov 4, 2010 3:02:40 PM (14 years ago)
Author:
vboxsync
Message:

VBoxManage extpack install: convert relative paths to absolute paths or we'll be subject to VBoxSVC's current directory.

File:
1 edited

Legend:

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

    r33766 r33775  
    929929            return errorSyntax(USAGE_EXTPACK, "Too many parameters given to \"extpack install\"");
    930930
    931         Bstr bstrTarball(a->argv[1]);
     931        char szPath[RTPATH_MAX];
     932        int vrc = RTPathAbs(a->argv[1], szPath, sizeof(szPath));
     933        if (RT_FAILURE(vrc))
     934            return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTPathAbs(%s,,) failed with rc=%Rrc", a->argv[1], vrc);
     935
     936        Bstr bstrTarball(szPath);
    932937        Bstr bstrName;
    933938        CHECK_ERROR2_RET(ptrExtPackMgr, Install(bstrTarball.raw(), bstrName.asOutParam()), RTEXITCODE_FAILURE);
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