diff --git a/Userland/Utilities/pkg/InstalledPort.cpp b/Userland/Utilities/pkg/InstalledPort.cpp index 34037c5dcb..b95cdb8657 100644 --- a/Userland/Utilities/pkg/InstalledPort.cpp +++ b/Userland/Utilities/pkg/InstalledPort.cpp @@ -22,7 +22,7 @@ Optional InstalledPort::type_from_string(StringView type) ErrorOr> InstalledPort::read_ports_database() { - auto file = TRY(Core::File::open(ports_database, Core::File::OpenMode::Read)); + auto file = TRY(Core::File::open(default_ports_database_path, Core::File::OpenMode::Read)); auto buffered_file = TRY(Core::InputBufferedFile::create(move(file))); auto buffer = TRY(ByteBuffer::create_uninitialized(PAGE_SIZE)); diff --git a/Userland/Utilities/pkg/InstalledPort.h b/Userland/Utilities/pkg/InstalledPort.h index cee70d1e23..3d4097a044 100644 --- a/Userland/Utilities/pkg/InstalledPort.h +++ b/Userland/Utilities/pkg/InstalledPort.h @@ -14,7 +14,7 @@ #include #include -constexpr StringView ports_database = "/usr/Ports/installed.db"sv; +constexpr StringView default_ports_database_path = "/usr/Ports/installed.db"sv; class InstalledPort : public Port { public: diff --git a/Userland/Utilities/pkg/main.cpp b/Userland/Utilities/pkg/main.cpp index 157a71a671..65264a65b3 100644 --- a/Userland/Utilities/pkg/main.cpp +++ b/Userland/Utilities/pkg/main.cpp @@ -81,8 +81,8 @@ ErrorOr serenity_main(Main::Arguments arguments) return_value = TRY(AvailablePort::update_available_ports_list_file()); } - if (Core::System::access(ports_database, R_OK).is_error()) { - warnln("pkg: {} isn't accessible, did you install a package in the past?", ports_database); + if (Core::System::access(default_ports_database_path, R_OK).is_error()) { + warnln("pkg: {} isn't accessible, did you install a package in the past?", default_ports_database_path); return 1; } HashMap installed_ports = TRY(InstalledPort::read_ports_database());