From: Andre Noll Date: Thu, 6 Nov 2008 08:52:28 +0000 (+0100) Subject: Ignore any snapshot directory with creation time > completion time. X-Git-Tag: v0.1.1~2 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=df465017098a79eaa7b1c1c2f958f262b4dc521e;p=dss.git Ignore any snapshot directory with creation time > completion time. Without this fix, dss would abort du to an assertion in dss.c: dss.c:171: compute_next_snapshot_time: Assertion `x >= 0' failed. Thanks to Sebastian Stark for pointing out this flaw. --- diff --git a/snap.c b/snap.c index 89d6004..1fab237 100644 --- a/snap.c +++ b/snap.c @@ -101,7 +101,7 @@ static int is_snapshot(const char *dirname, int64_t now, int unit_interval, free(tmp); if (ret < 0) return 0; - if (num > now) + if (num > now || num < s->creation_time) return 0; s->completion_time = num; s->flags = SS_COMPLETE;