(file) Return to InstanceIndexFile.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Repository

Diff for /pegasus/src/Pegasus/Repository/InstanceIndexFile.cpp between version 1.48 and 1.49

version 1.48, 2006/07/26 09:26:18 version 1.49, 2006/09/12 17:26:20
Line 960 
Line 960 
     //     //
     // Create a rollback file which is a copy of the index file. The     // Create a rollback file which is a copy of the index file. The
     // new filename is formed by appending ".rollback" to the name of     // new filename is formed by appending ".rollback" to the name of
     // the index file.      // the index file.  The rollback file, if it exists, is considered
       // the "master" copy of the data.  To ensure its completeness, the
       // index file is renamed to the rollback file and the data is then
       // copied back to the index file.
     //     //
     if (!FileSystem::copyFile(path, rollbackPath))  
       if (!FileSystem::renameFileNoCase(path, rollbackPath))
       {
           PEG_METHOD_EXIT();
           return false;
       }
   
       if (!FileSystem::copyFile(rollbackPath, path))
     {     {
         // Make sure no rollback file is left over.          // Try to restore the initial state
         FileSystem::removeFileNoCase(rollbackPath);          FileSystem::removeFileNoCase(path);
           FileSystem::renameFileNoCase(rollbackPath, path);
  
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         return false;         return false;


Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2