tar: Use BufferedFile for reading inputs

This commit is contained in:
Tim Schumacher 2023-04-04 20:57:11 +02:00 committed by Tim Flynn
parent 081cd9f9af
commit 9b4b12f133
Notes: sideshowbarker 2024-07-16 23:03:06 +09:00

View file

@ -74,7 +74,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (!directory.is_empty())
TRY(Core::System::chdir(directory));
NonnullOwnPtr<Stream> input_stream = TRY(Core::File::open_file_or_standard_stream(archive_file, Core::File::OpenMode::Read));
NonnullOwnPtr<Stream> input_stream = TRY(Core::BufferedFile::create(TRY(Core::File::open_file_or_standard_stream(archive_file, Core::File::OpenMode::Read))));
if (gzip)
input_stream = make<Compress::GzipDecompressor>(move(input_stream));