From df465017098a79eaa7b1c1c2f958f262b4dc521e Mon Sep 17 00:00:00 2001
From: Andre Noll <maan@systemlinux.org>
Date: Thu, 6 Nov 2008 09:52:28 +0100
Subject: [PATCH] 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.
---
 snap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.39.5