From c7662795f519d2b6797e4b1ac7fa4a22afa26310 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 27 Jul 2006 23:18:35 +0000 Subject: * merge - This is my current patch queue. I think that all of these are safe to apply. This is just under half of the pending changes in chris/general (the easy half). --- lib/backupclient/BackupClientFileAttributes.cpp | 2 ++ lib/backupclient/BackupStoreFile.cpp | 2 ++ lib/backupclient/BackupStoreObjectDump.cpp | 8 +++++++- 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/backupclient') diff --git a/lib/backupclient/BackupClientFileAttributes.cpp b/lib/backupclient/BackupClientFileAttributes.cpp index 974db3c9..ace72cf8 100644 --- a/lib/backupclient/BackupClientFileAttributes.cpp +++ b/lib/backupclient/BackupClientFileAttributes.cpp @@ -642,6 +642,7 @@ void BackupClientFileAttributes::WriteAttributes(const char *Filename) const } // If working as root, set user IDs + #ifndef WIN32 if(::geteuid() == 0) { #ifndef HAVE_LCHOWN @@ -661,6 +662,7 @@ void BackupClientFileAttributes::WriteAttributes(const char *Filename) const } #endif } + #endif if(static_cast(xattrOffset+sizeof(u_int32_t))<=mpClearAttributes->GetSize()) { diff --git a/lib/backupclient/BackupStoreFile.cpp b/lib/backupclient/BackupStoreFile.cpp index f5a55207..278bf50a 100644 --- a/lib/backupclient/BackupStoreFile.cpp +++ b/lib/backupclient/BackupStoreFile.cpp @@ -289,6 +289,8 @@ void BackupStoreFile::DecodeFile(IOStream &rEncodedFile, const char *DecodedFile // Copy it out to the file stream->CopyStreamTo(out); } + + out.Close(); // Write the attributes stream->GetAttributes().WriteAttributes(DecodedFilename); diff --git a/lib/backupclient/BackupStoreObjectDump.cpp b/lib/backupclient/BackupStoreObjectDump.cpp index b4ccc731..d3d9cc17 100644 --- a/lib/backupclient/BackupStoreObjectDump.cpp +++ b/lib/backupclient/BackupStoreObjectDump.cpp @@ -113,7 +113,13 @@ void BackupStoreDirectory::Dump(void *clibFileHandle, bool ToTrace) // Output item int16_t f = (*i)->GetFlags(); - OutputLine(file, ToTrace, "%06llx %4lld %016llx %4d %3d %4d%s%s%s%s%s%s\n", +#ifdef WIN32 + OutputLine(file, ToTrace, + "%06I64x %4I64d %016I64x %4d %3d %4d%s%s%s%s%s%s\n", +#else + OutputLine(file, ToTrace, + "%06llx %4lld %016llx %4d %3d %4d%s%s%s%s%s%s\n", +#endif (*i)->GetObjectID(), (*i)->GetSizeInBlocks(), (*i)->GetAttributesHash(), -- cgit v1.2.3