summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Services/LaunchServer/CMakeLists.txt2
-rw-r--r--Userland/Services/LaunchServer/Launcher.cpp16
2 files changed, 12 insertions, 6 deletions
diff --git a/Userland/Services/LaunchServer/CMakeLists.txt b/Userland/Services/LaunchServer/CMakeLists.txt
index e6f49231af..f97bca1175 100644
--- a/Userland/Services/LaunchServer/CMakeLists.txt
+++ b/Userland/Services/LaunchServer/CMakeLists.txt
@@ -19,4 +19,4 @@ set(GENERATED_SOURCES
)
serenity_bin(LaunchServer)
-target_link_libraries(LaunchServer PRIVATE LibCore LibIPC LibDesktop LibMain)
+target_link_libraries(LaunchServer PRIVATE LibCore LibIPC LibDesktop LibFileSystem LibMain)
diff --git a/Userland/Services/LaunchServer/Launcher.cpp b/Userland/Services/LaunchServer/Launcher.cpp
index b77341ae3c..87dd2b33f3 100644
--- a/Userland/Services/LaunchServer/Launcher.cpp
+++ b/Userland/Services/LaunchServer/Launcher.cpp
@@ -12,10 +12,10 @@
#include <AK/LexicalPath.h>
#include <AK/StringBuilder.h>
#include <LibCore/ConfigFile.h>
-#include <LibCore/DeprecatedFile.h>
#include <LibCore/MimeData.h>
#include <LibCore/Process.h>
#include <LibDesktop/AppFile.h>
+#include <LibFileSystem/FileSystem.h>
#include <errno.h>
#include <serenity.h>
#include <spawn.h>
@@ -303,16 +303,22 @@ void Launcher::for_each_handler_for_path(DeprecatedString const& path, Function<
return;
if (S_ISLNK(st.st_mode)) {
- auto link_target_or_error = Core::DeprecatedFile::read_link(path);
+ auto link_target_or_error = FileSystem::read_link(path);
if (link_target_or_error.is_error()) {
perror("read_link");
return;
}
- auto link_target = LexicalPath { link_target_or_error.release_value() };
+ auto link_target = LexicalPath { link_target_or_error.release_value().to_deprecated_string() };
LexicalPath absolute_link_target = link_target.is_absolute() ? link_target : LexicalPath::join(LexicalPath::dirname(path), link_target.string());
- auto real_path = Core::DeprecatedFile::real_path_for(absolute_link_target.string());
- return for_each_handler_for_path(real_path, [&](auto const& handler) -> bool {
+ auto real_path_or_error = FileSystem::real_path(absolute_link_target.string());
+ if (real_path_or_error.is_error()) {
+ perror("real_path");
+ return;
+ }
+ auto real_path = real_path_or_error.release_value();
+
+ return for_each_handler_for_path(real_path.to_deprecated_string(), [&](auto const& handler) -> bool {
return f(handler);
});
}