]> arthur.barton.de Git - bup.git/commit
Don't allow negative ns in metadata timestamps; normalize on read/write.
authorRob Browning <rlb@defaultvalue.org>
Sat, 25 Sep 2010 17:27:45 +0000 (12:27 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 25 Sep 2010 17:27:45 +0000 (12:27 -0500)
commit51869fc9ceeefcf0cd6bf95599a83a784004657e
tree5a5362fac90c98e9c9f71c5150efe6b9290a4ebd
parent3331e56781b32c81c6071ccfa925827650312a9c
Don't allow negative ns in metadata timestamps; normalize on read/write.

Read/write metadata timestamps as (vint-sec, vuint-ns) rather than
(vint-sec, vint-ns), and specify that ns must be > 0 and < 10**9.
Also specify that t = 0 indicates 1970-01-01 00:00:00.

Add metadata._normalize_ts() and normalize timestamps before write.
Also normalize timestamps when reading if necessary (and warn).
lib/bup/metadata.py
lib/bup/t/tmetadata.py