VirtualBox

Ignore:
Timestamp:
Jun 2, 2017 9:28:40 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
115916
Message:

VBoxManage: bugref:8344: when moving a medium, create an absolute path before calling the API function

Location:
trunk/src/VBox/Frontends/VBoxManage
Files:
2 edited

Legend:

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

    r66997 r67227  
    509509    uint64_t cbResize = 0;
    510510    const char *pszFilenameOrUuid = NULL;
    511     const char *pszNewLocation = NULL;
     511    char *pszNewLocation = NULL;
    512512
    513513    int c;
     
    602602            case 'm':   // --move
    603603                /* Get a new location  */
    604                 pszNewLocation = RTStrDup(ValueUnion.psz);
     604                pszNewLocation = RTPathAbsDup(ValueUnion.psz);
    605605                fModifyLocation = true;
    606606                break;
     
    760760            ComPtr<IProgress> pProgress;
    761761            Utf8Str strLocation(pszNewLocation);
    762             CHECK_ERROR(pMedium, SetLocation(Bstr(pszNewLocation).raw(), pProgress.asOutParam()));
     762            RTStrFree(pszNewLocation);
     763            CHECK_ERROR(pMedium, SetLocation(Bstr(strLocation).raw(), pProgress.asOutParam()));
    763764
    764765            if (SUCCEEDED(rc) && !pProgress.isNull())
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r67208 r67227  
    11501150                     "                            [--compact]\n"
    11511151                     "                            [--resize <megabytes>|--resizebyte <bytes>]\n"
    1152                      "                            [--move <full path to a new location>]\n"
     1152                     "                            [--move <path]\n"
    11531153                     "                            [--description <description string>]"
    11541154                     "\n", SEP);
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