Ignore:
Timestamp:
12/10/2006 22:35:39 (6 years ago)
Author:
chris
Message:
  • Use the same code for file names and file closing on other platforms

that's needed on Win32

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/bin/bbstored/BackupCommands.cpp

    r341 r989  
    1111 
    1212#include <syslog.h> 
     13#include <sstream> 
    1314 
    1415#include "autogen_BackupProtocolServer.h" 
     
    328329                         
    329330                        // Choose a temporary filename for the result of the combination 
    330                         std::string tempFn(RaidFileController::DiscSetPathToFileSystemPath(rContext.GetStoreDiscSet(), rContext.GetStoreRoot() + ".recombinetemp", 
    331                                 p + 16 /* rotate which disc it's on */)); 
     331                        std::ostringstream fs(rContext.GetStoreRoot()); 
     332                        fs << ".recombinetemp."; 
     333                        fs << p; 
     334                        std::string tempFn(fs.str()); 
     335                        tempFn = RaidFileController::DiscSetPathToFileSystemPath(rContext.GetStoreDiscSet(), tempFn, p + 16); 
    332336                         
    333337                        // Open the temporary file 
     
    360364                         
    361365                        // Then shuffle round for the next go 
     366                        if (from.get()) from->Close(); 
    362367                        from = combined; 
    363368                } 
Note: See TracChangeset for help on using the changeset viewer.