- Timestamp:
- Apr 7, 2009 1:02:43 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r18783 r18819 201 201 202 202 ComPtr<IMachine> machine; 203 CHECK_ERROR(a->virtualBox, OpenMachine(Bstr(a->argv[0]), machine.asOutParam())); 203 /** @todo Ugly hack to get both the API interpretation of relative paths 204 * and the client's interpretation of relative paths. Remove after the API 205 * has been redesigned. */ 206 rc = a->virtualBox->OpenMachine(Bstr(a->argv[0]), machine.asOutParam()); 207 if (rc == VBOX_E_FILE_ERROR) 208 { 209 char szVMFileAbs[RTPATH_MAX] = ""; 210 int vrc = RTPathAbs(a->argv[0], szVMFileAbs, sizeof(szVMFileAbs)); 211 if (RT_FAILURE(vrc)) 212 { 213 RTPrintf("Cannot convert filename \"%s\" to absolute path\n", a->argv[0]); 214 return 1; 215 } 216 CHECK_ERROR(a->virtualBox, OpenMachine(Bstr(szVMFileAbs), machine.asOutParam())); 217 } 218 else 219 CHECK_ERROR(a->virtualBox, OpenMachine(Bstr(a->argv[0]), machine.asOutParam())); 204 220 if (SUCCEEDED(rc)) 205 221 {
Note:
See TracChangeset
for help on using the changeset viewer.