From f2e266cefd78b8c685983343fd5e54cdd1ff6e09 Mon Sep 17 00:00:00 2001 From: Peter Eckersley Date: Mon, 11 Apr 2016 13:23:05 -0700 Subject: [PATCH] Only count actual checkpoints for ordering purposes --- letsencrypt/reverter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/letsencrypt/reverter.py b/letsencrypt/reverter.py index 5844ae6c2..7feae966c 100644 --- a/letsencrypt/reverter.py +++ b/letsencrypt/reverter.py @@ -1,5 +1,6 @@ """Reverter class saves configuration checkpoints and allows for recovery.""" import csv +import glob import logging import os import shutil @@ -510,7 +511,7 @@ class Reverter(object): def _checkpoint_timestamp(self): "Determine the timestamp of the checkpoint, enforcing monotonicity." timestamp = str(time.time()) - others = os.listdir(self.config.backup_dir) + others = glob.glob(os.path.join(self.config.backup_dir, "[0-9]*")) others.append(timestamp) others.sort() if others[-1] != timestamp: