Forráskód Böngészése

fix dump matching logic with labels.

Florian Apolloner 1 hónapja
szülő
commit
97815bb498
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      borgmatic/actions/restore.py

+ 2 - 2
borgmatic/actions/restore.py

@@ -33,9 +33,9 @@ def dumps_match(first, second, default_port=None):
     indicates that the field should match any value. If a default port is given, then consider any
     dump having that port to match with a dump having a None port.
     '''
-    # label kinda counts as id, if they match, consider it a full match
+    # label kinda counts as id, if they match ignore hostname & port
     if first.label not in {None, UNSPECIFIED} and first.label == second.label:
-        return True
+        return first[:2] == second[:2]
 
     for field_name in first._fields:
         first_value = getattr(first, field_name)