+ make RecoveryWriter more robust
This commit is contained in:
@@ -264,7 +264,7 @@ void FileWriter::putNextEntry(const char* file)
|
||||
this->FileStream.open(fileName.c_str(), std::ios::out);
|
||||
}
|
||||
|
||||
bool FileWriter::shouldWrite(const Base::Persistence *) const
|
||||
bool FileWriter::shouldWrite(const std::string& , const Base::Persistence *) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -278,7 +278,7 @@ void FileWriter::writeFiles(void)
|
||||
while (index < FileList.size()) {
|
||||
FileEntry entry = FileList.begin()[index];
|
||||
|
||||
if (shouldWrite(entry.Object)) {
|
||||
if (shouldWrite(entry.FileName, entry.Object)) {
|
||||
std::string filePath = entry.FileName;
|
||||
std::string::size_type pos = 0;
|
||||
while ((pos = filePath.find("/", pos)) != std::string::npos) {
|
||||
|
||||
@@ -165,7 +165,7 @@ private:
|
||||
std::stringstream StrStream;
|
||||
};
|
||||
|
||||
/*! The FileWriter class
|
||||
/*! The FileWriter class
|
||||
This class writes out the data into files into a given directory name.
|
||||
\see Base::Persistence
|
||||
\author Werner Mayer
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
to write out certain objects. The default implementation
|
||||
always returns true.
|
||||
*/
|
||||
virtual bool shouldWrite(const Base::Persistence *Object) const;
|
||||
virtual bool shouldWrite(const std::string& name, const Base::Persistence *Object) const;
|
||||
|
||||
private:
|
||||
std::string DirName;
|
||||
|
||||
Reference in New Issue
Block a user