mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +00:00
open: Prefer LibFileSystem over DeprecatedFile
This commit is contained in:
parent
34eb797013
commit
6e08f860f8
2 changed files with 4 additions and 4 deletions
|
@ -8,9 +8,9 @@
|
|||
#include <AK/URL.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/DeprecatedFile.h>
|
||||
#include <LibCore/EventLoop.h>
|
||||
#include <LibDesktop/Launcher.h>
|
||||
#include <LibFileSystem/FileSystem.h>
|
||||
#include <LibMain/Main.h>
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
|
@ -25,8 +25,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
bool all_ok = true;
|
||||
|
||||
for (auto& url_or_path : urls_or_paths) {
|
||||
auto path = Core::DeprecatedFile::real_path_for(url_or_path);
|
||||
auto url = URL::create_with_url_or_path(path.is_null() ? url_or_path : path.view());
|
||||
auto path = FileSystem::real_path(url_or_path);
|
||||
auto url = URL::create_with_url_or_path(path.is_error() ? url_or_path : path.value());
|
||||
|
||||
if (!Desktop::Launcher::open(url)) {
|
||||
warnln("Failed to open '{}'", url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue