tar: Return error instead of panic for XZ compression

Return a clear error message instead of TODO() panic when attempting to
create XZ-compressed archives since compression is not yet implemented.
This commit is contained in:
po-nuvai
2025-12-29 19:39:50 +05:30
committed by Nico Weber
parent db6317d63f
commit 1d3aa969e6

View File

@@ -238,7 +238,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
output_stream = TRY(Compress::LzmaCompressor::create_container(move(output_stream), {}));
if (xz)
TODO();
return Error::from_string_literal("Creating XZ compressed archives is not supported");
Archive::TarOutputStream tar_stream(move(output_stream));