mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
checksum: Make name detection working even with a path
This commit is contained in:
parent
0c09617b48
commit
23fe07a148
Notes:
sideshowbarker
2024-07-17 21:39:59 +09:00
Author: https://github.com/mhermier
Commit: 23fe07a148
Pull-request: https://github.com/SerenityOS/serenity/pull/11605
Reviewed-by: https://github.com/alimpfard
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/System.h>
|
||||
|
@ -15,7 +16,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
TRY(Core::System::pledge("stdio rpath", nullptr));
|
||||
|
||||
auto program_name = arguments.strings[0];
|
||||
auto program_name = LexicalPath::basename(arguments.strings[0]);
|
||||
auto hash_kind = Crypto::Hash::HashKind::None;
|
||||
|
||||
if (program_name == "md5sum")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue