From: Rob Browning Date: Wed, 29 Jun 2011 03:07:10 +0000 (-0500) Subject: Record the file size as Metadata.size when possible. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6a740cac64b2b833848863c24cc02655fd83a2d4;p=packages%2Fb%2Fbup.git Record the file size as Metadata.size when possible. Signed-off-by: Rob Browning Reviewed-by: Zoran Zaric --- diff --git a/lib/bup/metadata.py b/lib/bup/metadata.py index f4b5847..dfb04b1 100644 --- a/lib/bup/metadata.py +++ b/lib/bup/metadata.py @@ -559,6 +559,7 @@ class Metadata: def __init__(self): # optional members self.path = None + self.size = None self.symlink_target = None self.linux_attr = None self.linux_xattr = None @@ -639,6 +640,7 @@ def from_path(path, statinfo=None, archive_path=None, save_symlinks=True): result = Metadata() result.path = archive_path st = statinfo or xstat.lstat(path) + result.size = st.st_size result._add_common(path, st) if save_symlinks: result._add_symlink_target(path, st)