VirtualBox

Ignore:
Timestamp:
Jun 30, 2009 3:59:22 PM (15 years ago)
Author:
vboxsync
Message:

Main: move libxml2 to IPRT unconditionally (remove VBOX_WITH_LIBXML2_IN_VBOXRT); move xml classes to IPRT; introduce IPRT ministring class as base for both Utf8Str and xml.cpp, with better performance; introduce some Utf8Str helpers to avoid string buffer hacks in Main code; remove std::auto_ptr<> from some headers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ApplianceImpl.cpp

    r21077 r21079  
    2626#include <iprt/file.h>
    2727#include <iprt/s3.h>
     28#include "iprt/xml_cpp.h"
    2829
    2930#include <VBox/param.h>
     
    3940
    4041#include "Logging.h"
    41 
    42 #include "VBox/xml.h"
    4342
    4443using namespace std;
     
    234233//
    235234////////////////////////////////////////////////////////////////////////////////
    236 
    237 static Utf8Str stripFilename(const Utf8Str &strFile)
    238 {
    239     Utf8Str str2(strFile);
    240     RTPathStripFilename(str2.mutableRaw());
    241     return str2;
    242 }
    243235
    244236static const struct
     
    22462238                    /* The disk image has to be on the same place as the OVF file. So
    22472239                     * strip the filename out of the full file path. */
    2248                     Utf8Str strSrcDir = stripFilename(pAppliance->m->strPath);
     2240                    Utf8Str strSrcDir(pAppliance->m->strPath);
     2241                    strSrcDir.stripFilename();
    22492242
    22502243                    /* Iterate over all given disk images */
     
    35223515            const Utf8Str &strTargetFileNameOnly = pDiskEntry->strOvf;
    35233516            // target path needs to be composed from where the output OVF is
    3524             Utf8Str strTargetFilePath = stripFilename(m->strPath);
     3517            Utf8Str strTargetFilePath(m->strPath);
     3518            strTargetFilePath.stripFilename();
    35253519            strTargetFilePath.append("/");
    35263520            strTargetFilePath.append(strTargetFileNameOnly);
     
    37213715                const Utf8Str &strTargetFileNameOnly = (*itH)->strOvf;
    37223716                /* Target path needs to be composed from where the output OVF is */
    3723                 Utf8Str strTargetFilePath = stripFilename(m->strPath);
     3717                Utf8Str strTargetFilePath(m->strPath);
     3718                strTargetFilePath.stripFilename();
    37243719                strTargetFilePath.append("/");
    37253720                strTargetFilePath.append(strTargetFileNameOnly);
     
    47364731
    47374732            Utf8Str strTargetVmdkName(bstrName);
    4738             RTPathStripExt(strTargetVmdkName.mutableRaw());
     4733            strTargetVmdkName.stripExt();
    47394734            strTargetVmdkName.append(".vmdk");
    47404735
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