Commit 540317ea authored by Max Kellermann's avatar Max Kellermann

storage/nfs: use string::append() instead of string::insert()

Swap the order of adding the URI and the slash, because appending is cheaper than inserting.
parent 142d1951
......@@ -82,10 +82,9 @@ public:
static std::string
UriToNfsPath(const char *uri_utf8)
{
std::string path(uri_utf8);
/* libnfs paths must begin with a slash */
path.insert(path.begin(), '/');
std::string path("/");
path.append(uri_utf8);
return path;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment