Changeset 28692 in vbox
- Timestamp:
- Apr 24, 2010 7:14:03 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cpp/xml.h
r28689 r28692 683 683 * specified name. 684 684 * -# The directory changes are flushed to disk. 685 * The suffixes are available via s_pszTmpSuff and 686 * s_pszPrevSuff. 685 687 */ 686 688 void write(const char *pcszFilename, bool fSafe); 687 689 688 690 static int WriteCallback(void *aCtxt, const char *aBuf, int aLen); 689 static int CloseCallback (void *aCtxt); 691 static int CloseCallback(void *aCtxt); 692 693 /** The suffix used by XmlFileWriter::write() for the temporary file. */ 694 static const char * const s_pszTmpSuff; 695 /** The suffix used by XmlFileWriter::write() for the previous (backup) file. */ 696 static const char * const s_pszPrevSuff; 690 697 691 698 private: -
trunk/src/VBox/Runtime/r3/xml.cpp
r28689 r28692 1534 1534 /* Construct both filenames first to ease error handling. */ 1535 1535 char szTmpFilename[RTPATH_MAX]; 1536 int rc = RTStrCopy(szTmpFilename, sizeof(szTmpFilename) - s izeof("-tmp") + 1, pcszFilename);1536 int rc = RTStrCopy(szTmpFilename, sizeof(szTmpFilename) - strlen(s_pszTmpSuff), pcszFilename); 1537 1537 if (RT_FAILURE(rc)) 1538 1538 throw EIPRTFailure(rc, "RTStrCopy"); 1539 strcat(szTmpFilename, "-tmp");1539 strcat(szTmpFilename, s_pszTmpSuff); 1540 1540 1541 1541 char szPrevFilename[RTPATH_MAX]; 1542 rc = RTStrCopy(szPrevFilename, sizeof(szPrevFilename) - s izeof("-prev") + 1, pcszFilename);1542 rc = RTStrCopy(szPrevFilename, sizeof(szPrevFilename) - strlen(s_pszPrevSuff), pcszFilename); 1543 1543 if (RT_FAILURE(rc)) 1544 1544 throw EIPRTFailure(rc, "RTStrCopy"); 1545 strcat(szPrevFilename, "-prev");1545 strcat(szPrevFilename, s_pszPrevSuff); 1546 1546 1547 1547 /* Write the XML document to the temporary file. */ … … 1591 1591 } 1592 1592 1593 /*static*/ const char * const XmlFileWriter::s_pszTmpSuff = "-tmp"; 1594 /*static*/ const char * const XmlFileWriter::s_pszPrevSuff = "-prev"; 1595 1593 1596 1594 1597 } // end namespace xml
Note:
See TracChangeset
for help on using the changeset viewer.