db,storage: pass std::string_view to PathTraits::Build()
This commit is contained in:
@@ -75,7 +75,7 @@ CurlStorage::MapUTF8(const char *uri_utf8) const noexcept
|
||||
return base;
|
||||
|
||||
std::string path_esc = CurlEscapeUriPath(uri_utf8);
|
||||
return PathTraitsUTF8::Build(base.c_str(), path_esc.c_str());
|
||||
return PathTraitsUTF8::Build(base, path_esc);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
@@ -102,7 +102,7 @@ LocalStorage::MapUTF8(const char *uri_utf8) const noexcept
|
||||
if (StringIsEmpty(uri_utf8))
|
||||
return base_utf8;
|
||||
|
||||
return PathTraitsUTF8::Build(base_utf8.c_str(), uri_utf8);
|
||||
return PathTraitsUTF8::Build(base_utf8, uri_utf8);
|
||||
}
|
||||
|
||||
AllocatedPath
|
||||
|
@@ -240,7 +240,7 @@ NfsStorage::MapUTF8(const char *uri_utf8) const noexcept
|
||||
if (StringIsEmpty(uri_utf8))
|
||||
return base;
|
||||
|
||||
return PathTraitsUTF8::Build(base.c_str(), uri_utf8);
|
||||
return PathTraitsUTF8::Build(base, uri_utf8);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
@@ -81,7 +81,7 @@ SmbclientStorage::MapUTF8(const char *uri_utf8) const noexcept
|
||||
if (StringIsEmpty(uri_utf8))
|
||||
return base;
|
||||
|
||||
return PathTraitsUTF8::Build(base.c_str(), uri_utf8);
|
||||
return PathTraitsUTF8::Build(base, uri_utf8);
|
||||
}
|
||||
|
||||
const char *
|
||||
@@ -174,7 +174,7 @@ SmbclientDirectoryReader::Read() noexcept
|
||||
StorageFileInfo
|
||||
SmbclientDirectoryReader::GetInfo([[maybe_unused]] bool follow)
|
||||
{
|
||||
const std::string path = PathTraitsUTF8::Build(base.c_str(), name);
|
||||
const std::string path = PathTraitsUTF8::Build(base, name);
|
||||
return ::GetInfo(path.c_str());
|
||||
}
|
||||
|
||||
|
@@ -340,7 +340,7 @@ UdisksStorage::MapUTF8(const char *uri_utf8) const noexcept
|
||||
return mounted_storage->MapUTF8(uri_utf8);
|
||||
} catch (...) {
|
||||
/* fallback - not usable but the best we can do */
|
||||
return PathTraitsUTF8::Build(base_uri.c_str(), uri_utf8);
|
||||
return PathTraitsUTF8::Build(base_uri, uri_utf8);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user