mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 11:55:12 +00:00
gunzip: Remove StringView assignment on rhs-value
This commit is contained in:
parent
80a1ab3487
commit
5ac52d0e4c
1 changed files with 6 additions and 3 deletions
|
@ -41,10 +41,13 @@ ErrorOr<int> serenity_main(Main::Arguments args)
|
||||||
keep_input_files = true;
|
keep_input_files = true;
|
||||||
|
|
||||||
for (auto filename : filenames) {
|
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);
|
const auto output_filename = filename.substring_view(0, filename.length() - 3);
|
||||||
|
|
||||||
auto input_stream_result = TRY(Core::InputFileStream::open_buffered(input_filename));
|
auto input_stream_result = TRY(Core::InputFileStream::open_buffered(input_filename));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue