Parcourir la source

lzcat: Use BufferedFile for reading inputs

Tim Schumacher il y a 2 ans
Parent
commit
081cd9f9af
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      Userland/Utilities/lzcat.cpp

+ 2 - 1
Userland/Utilities/lzcat.cpp

@@ -22,7 +22,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
     args_parser.parse(arguments);
     args_parser.parse(arguments);
 
 
     auto file = TRY(Core::File::open_file_or_standard_stream(filename, Core::File::OpenMode::Read));
     auto file = TRY(Core::File::open_file_or_standard_stream(filename, Core::File::OpenMode::Read));
-    auto stream = TRY(Compress::LzmaDecompressor::create_from_container(move(file)));
+    auto buffered_file = TRY(Core::BufferedFile::create(move(file)));
+    auto stream = TRY(Compress::LzmaDecompressor::create_from_container(move(buffered_file)));
 
 
     // Arbitrarily chosen buffer size.
     // Arbitrarily chosen buffer size.
     Array<u8, 4096> buffer;
     Array<u8, 4096> buffer;