mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Userland: gunzip if filename doesn't end in .gz append it.
This is the behaviour of gzip on my Linux system.
This commit is contained in:
parent
049f709d0b
commit
b0ba7a897f
Notes:
sideshowbarker
2024-07-19 02:46:31 +09:00
Author: https://github.com/asynts Commit: https://github.com/SerenityOS/serenity/commit/b0ba7a897f8 Pull-request: https://github.com/SerenityOS/serenity/pull/3455
1 changed files with 3 additions and 2 deletions
|
@ -55,8 +55,9 @@ int main(int argc, char** argv)
|
|||
if (write_to_stdout)
|
||||
keep_input_files = true;
|
||||
|
||||
for (StringView filename : filenames) {
|
||||
ASSERT(filename.ends_with(".gz"));
|
||||
for (String filename : filenames) {
|
||||
if (!filename.ends_with(".gz"))
|
||||
filename = String::format("%s.gz", filename);
|
||||
|
||||
const auto input_filename = filename;
|
||||
const auto output_filename = filename.substring_view(0, filename.length() - 3);
|
||||
|
|
Loading…
Reference in a new issue