Skip to content

Commit 62f689f

Browse files
Don't include 'latest' or 'previous' symlink in backup count
1 parent d780ad5 commit 62f689f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mongodb_consistent_backup/State.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ def load_backups(self):
132132
if os.path.isdir(self.base_dir):
133133
for subdir in os.listdir(self.base_dir):
134134
try:
135-
if subdir == self.meta_name:
135+
bkp_path = os.path.join(self.base_dir, subdir)
136+
if subdir == self.meta_name or os.path.islink(bkp_path):
136137
continue
137-
bkp_path = os.path.join(self.base_dir, subdir)
138138
state_path = os.path.join(bkp_path, self.meta_name)
139139
state_file = os.path.join(state_path, "meta.bson")
140140
done_path = os.path.join(state_path, "done.bson")

0 commit comments

Comments
 (0)