VirtualBox

Changeset 46685 in vbox


Ignore:
Timestamp:
Jun 19, 2013 5:41:54 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
86581
Message:

Frontends/VBoxManage: automatically convert the video capture filename to an absolute path

File:
1 edited

Legend:

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

    r46667 r46685  
    24962496            case MODIFYVM_VCP_FILENAME:
    24972497            {
    2498                 Bstr bstr(ValueUnion.psz);
     2498                Bstr bstr;
     2499                /* empty string will fall through, leaving bstr empty */
     2500                if (*ValueUnion.psz)
     2501                {
     2502                    char szVCFileAbs[RTPATH_MAX] = "";
     2503                    int vrc = RTPathAbs(ValueUnion.psz, szVCFileAbs, sizeof(szVCFileAbs));
     2504                    if (RT_FAILURE(vrc))
     2505                    {
     2506                        errorArgument("Cannot convert filename \"%s\" to absolute path\n", ValueUnion.psz);
     2507                        rc = E_FAIL;
     2508                        break;
     2509                    }
     2510                    bstr = szVCFileAbs;
     2511                }
    24992512                CHECK_ERROR(machine, COMSETTER(VideoCaptureFile)(bstr.raw()));
    25002513                break;
Note: See TracChangeset for help on using the changeset viewer.

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