From d041935c6b967d6c2e6ad7b1f01ceb3612f6f62c Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Mon, 4 Jul 2016 11:49:06 +0200 Subject: [PATCH] Code review done, comment changes only --- deltatar/deltatar.py | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/deltatar/deltatar.py b/deltatar/deltatar.py index b258cf6..5c3d9b5 100644 --- a/deltatar/deltatar.py +++ b/deltatar/deltatar.py @@ -432,12 +432,11 @@ class DeltaTar(object): Return if the dicts are equal in the stat keys ''' keys = [u'type', u'mode',u'size', u'mtime', - # TODO: check how to restore this correctly if possible - # u'inode', u'ctime' + # not restored: u'inode', u'ctime' ] # only if user is root, then also check gid/uid. otherwise do not check it, - # because tarfile can chown in case of being superuser + # because tarfile can chown in case of being superuser only if hasattr(os, "geteuid") and os.geteuid() == 0: keys.append('gid') keys.append('uid') @@ -638,7 +637,7 @@ class DeltaTar(object): statd['offset'] = tarobj.get_last_member_offset() self.logger.debug("backup %s" % statd['path']) - # store in the index the stat dict + # store the stat dict in the index s = bytes(json.dumps(statd) + '\n', 'UTF-8') crc = binascii.crc32(s, crc) & 0xffffffff index_fd.write(s) @@ -804,7 +803,7 @@ class DeltaTar(object): if not ipath: action = 'snapshot' # if the file is not in the directory iterator, it means that it has - # been deleted, so we need to mark it as suck + # been deleted, so we need to mark it as such elif not dpath: action = 'delete' # if the file is in both iterators, it means it might have either -- 1.7.1