summaryrefslogtreecommitdiff
path: root/lib/backupclient/BackupStoreObjectDump.cpp
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2009-04-02 13:58:11 +0200
committerReinhard Tartler <siretart@tauware.de>2009-04-02 13:58:11 +0200
commita84d45498bd861c9225080232948a99c2e317bb8 (patch)
tree8f1f5fb7bf7ffbf6f24cf4a4fd6888a235dbcc08 /lib/backupclient/BackupStoreObjectDump.cpp
parent25db897553a0db0f912602b375029e724f51556e (diff)
Import upstream version 0.11~rc3~r2491
Diffstat (limited to 'lib/backupclient/BackupStoreObjectDump.cpp')
-rw-r--r--lib/backupclient/BackupStoreObjectDump.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/backupclient/BackupStoreObjectDump.cpp b/lib/backupclient/BackupStoreObjectDump.cpp
index d3d9cc17..654317c1 100644
--- a/lib/backupclient/BackupStoreObjectDump.cpp
+++ b/lib/backupclient/BackupStoreObjectDump.cpp
@@ -47,7 +47,7 @@ static void OutputLine(FILE *file, bool ToTrace, const char *format, ...)
}
if(ToTrace)
{
- TRACE1("%s", text);
+ BOX_TRACE(text);
}
}
@@ -70,7 +70,7 @@ void BackupStoreDirectory::Dump(void *clibFileHandle, bool ToTrace)
mAttributesModTime, mAttributes.GetSize());
// So repeated filenames can be illustrated, even though they can't be decoded
- std::map<BackupStoreFilename, int> nameNum;
+ std::map<std::string, int> nameNum;
int nameNumI = 0;
// Dump items
@@ -78,7 +78,7 @@ void BackupStoreDirectory::Dump(void *clibFileHandle, bool ToTrace)
for(std::vector<Entry*>::const_iterator i(mEntries.begin()); i != mEntries.end(); ++i)
{
// Choose file name index number for this file
- std::map<BackupStoreFilename, int>::iterator nn(nameNum.find((*i)->GetName()));
+ std::map<std::string, int>::iterator nn(nameNum.find((*i)->GetName().GetEncodedFilename()));
int ni = nameNumI;
if(nn != nameNum.end())
{
@@ -86,7 +86,7 @@ void BackupStoreDirectory::Dump(void *clibFileHandle, bool ToTrace)
}
else
{
- nameNum[(*i)->GetName()] = nameNumI;
+ nameNum[(*i)->GetName().GetEncodedFilename()] = nameNumI;
++nameNumI;
}
@@ -124,7 +124,7 @@ void BackupStoreDirectory::Dump(void *clibFileHandle, bool ToTrace)
(*i)->GetSizeInBlocks(),
(*i)->GetAttributesHash(),
(*i)->GetAttributes().GetSize(),
- (*i)->GetName().size(),
+ (*i)->GetName().GetEncodedFilename().size(),
ni,
((f & BackupStoreDirectory::Entry::Flags_File)?" file":""),
((f & BackupStoreDirectory::Entry::Flags_Dir)?" dir":""),
@@ -173,7 +173,8 @@ void BackupStoreFile::DumpFile(void *clibFileHandle, bool ToTrace, IOStream &rFi
// Read the next two objects
BackupStoreFilename fn;
fn.ReadFromStream(rFile, IOStream::TimeOutInfinite);
- OutputLine(file, ToTrace, "Filename size: %d\n", fn.size());
+ OutputLine(file, ToTrace, "Filename size: %d\n",
+ fn.GetEncodedFilename().size());
BackupClientFileAttributes attr;
attr.ReadFromStream(rFile, IOStream::TimeOutInfinite);
@@ -211,14 +212,16 @@ void BackupStoreFile::DumpFile(void *clibFileHandle, bool ToTrace, IOStream &rFi
if(s > 0)
{
nnew++;
- TRACE2("%8lld this s=%8lld\n", b, s);
+ BOX_TRACE(std::setw(8) << b << " this s=" <<
+ std::setw(8) << s);
}
else
{
nold++;
- TRACE2("%8lld other i=%8lld\n", b, 0 - s);
+ BOX_TRACE(std::setw(8) << b << " other i=" <<
+ std::setw(8) << 0 - s);
}
}
- TRACE0("======== ===== ==========\n");
+ BOX_TRACE("======== ===== ==========");
}