Index: /box/trunk/lib/backupstore/BackupClientFileAttributes.h
===================================================================
--- /box/trunk/lib/backupstore/BackupClientFileAttributes.h	(revision 3066)
+++ /box/trunk/lib/backupstore/BackupClientFileAttributes.h	(revision 3067)
@@ -30,4 +30,5 @@
 public:
 	BackupClientFileAttributes();
+	BackupClientFileAttributes(const EMU_STRUCT_STAT &st);
 	BackupClientFileAttributes(const BackupClientFileAttributes &rToCopy);
 	BackupClientFileAttributes(const StreamableMemBlock &rToCopy);
@@ -61,5 +62,5 @@
 private:
 	static void FillAttributes(StreamableMemBlock &outputBlock,
-		const char *Filename, EMU_STRUCT_STAT &st,
+		const char *Filename, const EMU_STRUCT_STAT &st,
 		bool ZeroModificationTimes);
 	static void FillAttributesLink(StreamableMemBlock &outputBlock, const char *Filename, struct stat &st);
Index: /box/trunk/lib/backupstore/BackupClientFileAttributes.cpp
===================================================================
--- /box/trunk/lib/backupstore/BackupClientFileAttributes.cpp	(revision 3066)
+++ /box/trunk/lib/backupstore/BackupClientFileAttributes.cpp	(revision 3067)
@@ -124,4 +124,28 @@
 //
 // Function
+//		Name:    BackupClientFileAttributes::BackupClientFileAttributes()
+//		Purpose: Artifical constructor
+//		Created: 2011/12/06
+//
+// --------------------------------------------------------------------------
+BackupClientFileAttributes::BackupClientFileAttributes(const EMU_STRUCT_STAT &st)
+: mpClearAttributes(0)
+{
+	ASSERT(sizeof(u_int64_t) == sizeof(box_time_t));
+	StreamableMemBlock *pnewAttr = new StreamableMemBlock;
+	FillAttributes(*pnewAttr, (const char *)NULL, st, true);
+
+	// Attributes ready. Encrypt into this block
+	EncryptAttr(*pnewAttr);
+	
+	// Store the new attributes
+	RemoveClear();
+	mpClearAttributes = pnewAttr;
+	pnewAttr = 0;
+}
+
+// --------------------------------------------------------------------------
+//
+// Function
 //		Name:    BackupClientFileAttributes::BackupClientFileAttributes(const BackupClientFileAttributes &)
 //		Purpose: Copy constructor
@@ -437,10 +461,13 @@
 //
 // Function
-//		Name:    BackupClientFileAttributes::ReadAttributesLink()
+//		Name:    BackupClientFileAttributes::FillAttributes()
 //		Purpose: Private function, handles standard attributes for all objects
 //		Created: 2003/10/07
 //
 // --------------------------------------------------------------------------
-void BackupClientFileAttributes::FillAttributes(StreamableMemBlock &outputBlock, const char *Filename, EMU_STRUCT_STAT &st, bool ZeroModificationTimes)
+void BackupClientFileAttributes::FillAttributes(
+	StreamableMemBlock &outputBlock, const char *Filename,
+	const EMU_STRUCT_STAT &st, bool ZeroModificationTimes
+)
 {
 	outputBlock.ResizeBlock(sizeof(attr_StreamFormat));
@@ -476,5 +503,7 @@
 //
 // Function
-//		Name:    BackupClientFileAttributes::ReadAttributesLink()
+//		Name:    BackupClientFileAttributes::FillAttributesLink(
+//			 StreamableMemBlock &outputBlock,
+//			 const char *Filename, struct stat &st)
 //		Purpose: Private function, handles the case where a symbolic link is needed
 //		Created: 2003/10/07
@@ -508,5 +537,5 @@
 //
 // Function
-//		Name:    BackupClientFileAttributes::ReadExtendedAttr(const char *, unsigned char**)
+//		Name:    BackupClientFileAttributes::FillExtendedAttr(const char *, unsigned char**)
 //		Purpose: Private function, read the extended attributes of the file into the block
 //		Created: 2005/06/12
