feat: Enable appending to tar archives created outside of STFS by seeking over EOF mark manually

This commit is contained in:
Felicitas Pojtinger
2022-01-25 04:14:19 +01:00
parent 7585937ce8
commit 717ecab64d

View File

@@ -103,9 +103,17 @@ func Index(
}
if hdr == nil {
// EOF
// Try to skip over the next file mark; this makes it possible to append to a tar file created by i.e. GNU tar
if _, err := reader.Drive.Read(make([]byte, config.MagneticTapeBlockSize*2)); err != nil {
if err == io.EOF {
// EOF
break
}
break
return err
}
continue
}
if i >= offset {