mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
gunzip: Remove StringView assignment on rhs-value
This commit is contained in:
committed by
Idan Horowitz
parent
80a1ab3487
commit
5ac52d0e4c
@@ -41,10 +41,13 @@ ErrorOr<int> serenity_main(Main::Arguments args)
|
||||
keep_input_files = true;
|
||||
|
||||
for (auto filename : filenames) {
|
||||
if (!filename.ends_with(".gz"))
|
||||
filename = String::formatted("{}.gz", filename);
|
||||
|
||||
const auto input_filename = filename;
|
||||
String input_filename;
|
||||
if (filename.ends_with(".gz"))
|
||||
input_filename = filename;
|
||||
else
|
||||
input_filename = String::formatted("{}.gz", filename);
|
||||
|
||||
const auto output_filename = filename.substring_view(0, filename.length() - 3);
|
||||
|
||||
auto input_stream_result = TRY(Core::InputFileStream::open_buffered(input_filename));
|
||||
|
||||
Reference in New Issue
Block a user