]> arthur.barton.de Git - bup.git/commit - lib/bup/xstat.py
Don't require non-negative timespec ns; fix stat timestamp conversions.
authorRob Browning <rlb@defaultvalue.org>
Thu, 19 Dec 2013 04:16:44 +0000 (22:16 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sat, 28 Dec 2013 21:22:50 +0000 (15:22 -0600)
commit85982e45546486479d09d0409d0c70b7b73a1013
treeed8ef419a3ee6023886dc59a604b0a5202d05f0f
parentaa653fc56bcad1fc5173451e334664f542e57ae4
Don't require non-negative timespec ns; fix stat timestamp conversions.

Previously we required that the system timespec tv_nsec values be
non-negative -- stop that.  POSIX doesn't specify, and there's no real
need for us to care, since all significant timestamp manipulations are
now handled as integer nanosecond values, not (sec, ns) pairs.

Change stat_struct_to_py() (used by bup_stat()/bup_lstat()) to use
INTEGER_TO_PY() to convert the timestamp st_atime/st_mtime/st_ctime
values so that we don't have to care about the sign/size of the
underlying type (which should be time_t).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c
lib/bup/t/txstat.py
lib/bup/xstat.py