db/simple: pass std::string_view to Directory::LookupDirectory()
This commit is contained in:
@@ -169,7 +169,7 @@ UpdateService::GenerateId() noexcept
|
||||
}
|
||||
|
||||
unsigned
|
||||
UpdateService::Enqueue(const char *path, bool discard)
|
||||
UpdateService::Enqueue(const char *_path, bool discard)
|
||||
{
|
||||
assert(GetEventLoop().IsInside());
|
||||
|
||||
@@ -178,6 +178,8 @@ UpdateService::Enqueue(const char *path, bool discard)
|
||||
SimpleDatabase *db2;
|
||||
Storage *storage2;
|
||||
|
||||
std::string_view path(_path);
|
||||
|
||||
Directory::LookupResult lr;
|
||||
{
|
||||
const ScopeDatabaseLock protect;
|
||||
@@ -192,7 +194,7 @@ UpdateService::Enqueue(const char *path, bool discard)
|
||||
if (db2 == nullptr)
|
||||
throw std::runtime_error("Cannot update this type of database");
|
||||
|
||||
if (lr.rest == nullptr) {
|
||||
if (lr.rest.data() == nullptr) {
|
||||
storage2 = storage.GetMount(path);
|
||||
path = "";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user