diff --git a/Userland/Utilities/CMakeLists.txt b/Userland/Utilities/CMakeLists.txt index f6fa8231a6e..9079887ebf7 100644 --- a/Userland/Utilities/CMakeLists.txt +++ b/Userland/Utilities/CMakeLists.txt @@ -72,7 +72,7 @@ install(CODE "file(CREATE_LINK grep ${CMAKE_INSTALL_PREFIX}/bin/fgrep SYMBOLIC)" install(CODE "file(CREATE_LINK grep ${CMAKE_INSTALL_PREFIX}/bin/rgrep SYMBOLIC)") target_link_libraries(abench PRIVATE LibAudio LibFileSystem) -target_link_libraries(aplay PRIVATE LibAudio LibIPC) +target_link_libraries(aplay PRIVATE LibAudio LibFileSystem LibIPC) target_link_libraries(asctl PRIVATE LibAudio LibIPC) target_link_libraries(bt PRIVATE LibSymbolication) target_link_libraries(checksum PRIVATE LibCrypto) diff --git a/Userland/Utilities/aplay.cpp b/Userland/Utilities/aplay.cpp index 4e981b8971e..5210646a163 100644 --- a/Userland/Utilities/aplay.cpp +++ b/Userland/Utilities/aplay.cpp @@ -10,9 +10,9 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -35,10 +35,8 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_option(show_sample_progress, "Show playback progress in samples", "sample-progress", 's'); args_parser.parse(arguments); - auto absolute_path = Core::DeprecatedFile::absolute_path(path); - TRY(Core::System::unveil("/tmp/session/%sid/portal/audio", "rw")); - TRY(Core::System::unveil(absolute_path, "r"sv)); + TRY(Core::System::unveil(TRY(FileSystem::absolute_path(path)), "r"sv)); TRY(Core::System::unveil(nullptr, nullptr)); Core::EventLoop loop;