mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
Utilities/pkg: Rename ports_database => default_ports_database_path
This commit is contained in:
parent
8b189b7eb0
commit
b201a91e72
3 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ Optional<InstalledPort::Type> InstalledPort::type_from_string(StringView type)
|
|||
|
||||
ErrorOr<HashMap<String, InstalledPort>> 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));
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <AK/Variant.h>
|
||||
#include <LibSemVer/SemVer.h>
|
||||
|
||||
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:
|
||||
|
|
|
@ -81,8 +81,8 @@ ErrorOr<int> 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<String, InstalledPort> installed_ports = TRY(InstalledPort::read_ports_database());
|
||||
|
|
Loading…
Reference in a new issue