summaryrefslogtreecommitdiff
path: root/lib/backupclient
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2010-02-24 20:28:33 +0000
committerChris Wilson <chris+github@qwirx.com>2010-02-24 20:28:33 +0000
commit4ebb914c24ef010e799bc74ad5f3987e3ab5a249 (patch)
treeff21e9853562a72918d0651ea4334b2f17033078 /lib/backupclient
parentaaf98b770db720d8a866e135b7cf39ab144032b1 (diff)
Add option to display attribute modification times from additional
attributes if available in bbackupquery.
Diffstat (limited to 'lib/backupclient')
-rw-r--r--lib/backupclient/BackupClientFileAttributes.cpp16
-rw-r--r--lib/backupclient/BackupClientFileAttributes.h3
2 files changed, 15 insertions, 4 deletions
diff --git a/lib/backupclient/BackupClientFileAttributes.cpp b/lib/backupclient/BackupClientFileAttributes.cpp
index 32c30395..af156a1d 100644
--- a/lib/backupclient/BackupClientFileAttributes.cpp
+++ b/lib/backupclient/BackupClientFileAttributes.cpp
@@ -650,13 +650,15 @@ void BackupClientFileAttributes::FillExtendedAttr(StreamableMemBlock &outputBloc
// --------------------------------------------------------------------------
//
// Function
-// Name: BackupClientFileAttributes::GetModificationTime()
+// Name: BackupClientFileAttributes::GetModificationTimes()
// Purpose: Returns the modification time embedded in the
// attributes.
// Created: 2010/02/24
//
// --------------------------------------------------------------------------
-box_time_t BackupClientFileAttributes::GetModificationTime() const
+void BackupClientFileAttributes::GetModificationTimes(
+ box_time_t *pModificationTime,
+ box_time_t *pAttrModificationTime) const
{
// Got something loaded
if(GetSize() <= 0)
@@ -691,7 +693,15 @@ box_time_t BackupClientFileAttributes::GetModificationTime() const
// Get pointer to structure
attr_StreamFormat *pattr = (attr_StreamFormat*)mpClearAttributes->GetBuffer();
- return box_ntoh64(pattr->ModificationTime);
+ if(pModificationTime)
+ {
+ *pModificationTime = box_ntoh64(pattr->ModificationTime);
+ }
+
+ if(pAttrModificationTime)
+ {
+ *pAttrModificationTime = box_ntoh64(pattr->AttrModificationTime);
+ }
}
// --------------------------------------------------------------------------
diff --git a/lib/backupclient/BackupClientFileAttributes.h b/lib/backupclient/BackupClientFileAttributes.h
index bd45dd18..f9a0d883 100644
--- a/lib/backupclient/BackupClientFileAttributes.h
+++ b/lib/backupclient/BackupClientFileAttributes.h
@@ -47,7 +47,8 @@ public:
InodeRefType *pInodeNumber = 0, bool *pHasMultipleLinks = 0);
void WriteAttributes(const char *Filename,
bool MakeUserWritable = false) const;
- box_time_t GetModificationTime() const;
+ void GetModificationTimes(box_time_t *pModificationTime,
+ box_time_t *pAttrModificationTime) const;
bool IsSymLink() const;