mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
gunzip: Remove StringView assignment on rhs-value
This commit is contained in:
parent
80a1ab3487
commit
5ac52d0e4c
Notes:
sideshowbarker
2024-07-17 20:54:24 +09:00
Author: https://github.com/LucasChollet
Commit: 5ac52d0e4c
Pull-request: https://github.com/SerenityOS/serenity/pull/11880
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/mjz19910
1 changed files with 6 additions and 3 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue