From: Thomas Jarosch Date: Mon, 4 Jul 2016 09:49:06 +0000 (+0200) Subject: Code review done, comment changes only X-Git-Tag: v2.2~10 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=d041935c6b967d6c2e6ad7b1f01ceb3612f6f62c;p=python-delta-tar Code review done, comment changes only --- 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