Fix issue where tar backups with files > 8GB was corrupt

Fixes #640
This commit is contained in:
Girish Ramakrishnan
2019-07-10 14:35:47 -07:00
parent 9f03a9a6e2
commit 117f06e971
2 changed files with 6 additions and 0 deletions

View File

@@ -291,6 +291,9 @@ function tarPack(dataLayout, key, callback) {
},
map: function(header) {
header.name = dataLayout.toRemotePath(header.name);
// the tar pax format allows us to encode filenames > 100 and size > 8GB (see #640)
// https://www.systutorials.com/docs/linux/man/5-star/
if (header.size > 8589934590 || header.name > 99) header.pax = { size: header.size };
return header;
},
strict: false // do not error for unknown types (skip fifo, char/block devices)