Explorar o código

bugfix: do no assume hardlink_master=True if not present, see #7175

this would produce unneeded item.hlid attributes
for fifos, char and block devices when transferring /
upgrading from faulty borg 1.x archives.
Thomas Waldmann %!s(int64=2) %!d(string=hai) anos
pai
achega
c343673ab5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/borg/helpers/fs.py

+ 1 - 1
src/borg/helpers/fs.py

@@ -202,7 +202,7 @@ class HardLinkManager:
         return stat.S_ISREG(mode) or stat.S_ISBLK(mode) or stat.S_ISCHR(mode) or stat.S_ISFIFO(mode)
 
     def borg1_hardlink_master(self, item):  # legacy
-        return item.get("hardlink_master", True) and "source" not in item and self.borg1_hardlinkable(item.mode)
+        return item.get("hardlink_master", False) and "source" not in item and self.borg1_hardlinkable(item.mode)
 
     def borg1_hardlink_slave(self, item):  # legacy
         return "source" in item and self.borg1_hardlinkable(item.mode)