vbox的更動 17362 路徑 trunk/src/VBox/Main/ApplianceImpl.cpp
- 時間撮記:
- 2009-3-4 下午06:10:58 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/ApplianceImpl.cpp
r17343 r17362 115 115 struct Appliance::Data 116 116 { 117 Bstr bstrPath;117 Utf8Str strPath; // file name last given to either read() or write() 118 118 119 119 DiskImagesMap mapDisks; // map of DiskImage structs, sorted by DiskImage.strDiskId … … 938 938 AutoReadLock alock(this); 939 939 940 m->bstrPath.cloneTo(aPath); 940 Bstr bstrPath(m->strPath); 941 bstrPath.cloneTo(aPath); 941 942 942 943 return S_OK; … … 1226 1227 1227 1228 AutoWriteLock alock(this); 1228 m->bstrPath = path;1229 1229 1230 1230 // see if we can handle this file; for now we insist it has an ".ovf" extension 1231 Utf8Str utf8Path(path);1232 const char *pcszLastDot = strrchr( utf8Path, '.');1231 m->strPath = path; 1232 const char *pcszLastDot = strrchr(m->strPath, '.'); 1233 1233 if ( (!pcszLastDot) 1234 1234 || ( strcmp(pcszLastDot, ".ovf") … … 1243 1243 xml::XmlFileParser parser; 1244 1244 xml::Document doc; 1245 parser.read( utf8Path.raw(),1245 parser.read(m->strPath.raw(), 1246 1246 doc); 1247 1247 … … 1267 1267 1268 1268 // now go though the sections 1269 if (!(SUCCEEDED(rc = LoopThruSections( utf8Path.raw(), pReferencesElem, pRootElem))))1269 if (!(SUCCEEDED(rc = LoopThruSections(m->strPath.raw(), pReferencesElem, pRootElem)))) 1270 1270 return rc; 1271 1271 } … … 1654 1654 { 1655 1655 uint32_t opCount = calcMaxProgress(); 1656 Bstr progressDesc = BstrFmt(tr("Import appliance '% ls'"),1657 m-> bstrPath.raw());1656 Bstr progressDesc = BstrFmt(tr("Import appliance '%s'"), 1657 m->strPath.raw()); 1658 1658 /* Create the progress object */ 1659 1659 progress.createObject(); … … 1695 1695 if (FAILED(rc = autoCaller.rc())) return rc; 1696 1696 1697 AutoReadLock(this); 1697 AutoWriteLock(this); 1698 1699 // see if we can handle this file; for now we insist it has an ".ovf" extension 1700 m->strPath = path; 1701 const char *pcszLastDot = strrchr(m->strPath, '.'); 1702 if ( (!pcszLastDot) 1703 || ( strcmp(pcszLastDot, ".ovf") 1704 && strcmp(pcszLastDot, ".OVF") 1705 ) 1706 ) 1707 return setError(VBOX_E_FILE_ERROR, 1708 tr("Appliance file must have .ovf extension")); 1698 1709 1699 1710 ComObjPtr<Progress> progress; … … 1701 1712 { 1702 1713 uint32_t opCount = calcMaxProgress(); 1703 Bstr progressDesc = BstrFmt(tr("Write appliance '% ls'"),1704 m-> bstrPath.raw());1714 Bstr progressDesc = BstrFmt(tr("Write appliance '%s'"), 1715 m->strPath.raw()); 1705 1716 /* Create the progress object */ 1706 1717 progress.createObject(); … … 2103 2114 /* The disk image has to be on the same place as the OVF file. So 2104 2115 * strip the filename out of the full file path. */ 2105 Utf8Str strSrcDir = stripFilename( Utf8Str(pAppliance->m->bstrPath).raw());2116 Utf8Str strSrcDir = stripFilename(pAppliance->m->strPath); 2106 2117 2107 2118 /* Iterate over all given disk images */ … … 2443 2454 try 2444 2455 { 2456 xml::Document doc; 2457 doc.createRootElement("Envelope"); 2458 2459 xml::XmlFileWriter writer(doc); 2460 writer.write(pAppliance->m->strPath.c_str()); 2445 2461 } 2446 2462 catch(HRESULT aRC)
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器