diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2023-05-20 10:14:22 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-21 07:50:52 +0200 |
commit | 8afd09b423e94be6a495546fd262184b55381b61 (patch) | |
tree | b9e5993a0452bd9130a72ab8715bec999701df0e /Userland/Utilities/shot.cpp | |
parent | 487ec64a78dccbc003356acf2be9fcc184ef438c (diff) | |
download | serenity-8afd09b423e94be6a495546fd262184b55381b61.zip |
shot: Prefer LibFileSystem over DeprecatedFile
Diffstat (limited to 'Userland/Utilities/shot.cpp')
-rw-r--r-- | Userland/Utilities/shot.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Utilities/shot.cpp b/Userland/Utilities/shot.cpp index 8b7caf975e..2d7a3b1836 100644 --- a/Userland/Utilities/shot.cpp +++ b/Userland/Utilities/shot.cpp @@ -11,8 +11,8 @@ #include <AK/URL.h> #include <LibCore/ArgsParser.h> #include <LibCore/DateTime.h> -#include <LibCore/DeprecatedFile.h> #include <LibCore/Process.h> +#include <LibFileSystem/FileSystem.h> #include <LibGUI/Application.h> #include <LibGUI/Clipboard.h> #include <LibGUI/ConnectionToWindowServer.h> @@ -174,12 +174,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) bool printed_hyperlink = false; if (isatty(STDOUT_FILENO)) { - auto full_path = Core::DeprecatedFile::real_path_for(output_path); - if (!full_path.is_null()) { + auto full_path_or_error = FileSystem::real_path(output_path); + if (!full_path_or_error.is_error()) { char hostname[HOST_NAME_MAX]; VERIFY(gethostname(hostname, sizeof(hostname)) == 0); - auto url = URL::create_with_file_scheme(full_path, {}, hostname); + auto url = URL::create_with_file_scheme(full_path_or_error.value().to_deprecated_string(), {}, hostname); out("\033]8;;{}\033\\", url.serialize()); printed_hyperlink = true; } |