Skip to content

Conversation

@wlritchi
Copy link
Contributor

The MIME type detected for a tar file depends on the compression scheme in use; match any of the schemes supported by mc-backup, as well as uncompressed tar files. .tar.zst archives require the zstd package; add it to the Dockerfile.

The existing test labelled as tgz actually contained just an uncompressed tar file padded to 10KiB with zeroes. I assume this was unintended (tar won't automatically compress according to the file extension unless you pass -a). Rename that test to .tar, and add equivalent tests for .tar.gz, .tar.bz2, and .tar.zst (the three types of compression supported by mc-backup).

The MIME type detected for a tar file depends on the compression scheme
in use; match any of the schemes supported by mc-backup, as well as
uncompressed tar files. .tar.zst archives require the zstd package; add
it to the Dockerfile.

The existing test labelled as tgz actually contained just an
uncompressed tar file padded to 10KiB with zeroes. I assume this was
unintended (tar won't automatically compress according to the file
extension unless you pass -a). Rename that test to "tar", and add
equivalent tests for .tar.gz, .tar.bz2, and .tar.zst (the three types
of compression supported by mc-backup).
Copy link
Owner

@itzg itzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Yes, I can now picture myself doing only tar cf to create that test file.

@itzg itzg merged commit 8a42dfe into itzg:master Jan 25, 2022
@wlritchi wlritchi deleted the test/fix-targz-support branch January 25, 2022 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants