summaryrefslogtreecommitdiffstats
path: root/src/osd/modules/file/posixdir.cpp
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2022-06-16 12:37:26 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2022-06-16 12:37:26 +1000
commit731a6bbe8ac51a5ff006a0bca574a96f8f498051 (patch)
tree546c8b0812269188490334548bdf159d2843bfa7 /src/osd/modules/file/posixdir.cpp
parent4e2121d8aa3a982288849c08500712f0cb2d96bc (diff)
parente7fe75fd5c901a2b62456dcfa2fbd6144bebf233 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/osd/modules/file/posixdir.cpp')
-rw-r--r--src/osd/modules/file/posixdir.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osd/modules/file/posixdir.cpp b/src/osd/modules/file/posixdir.cpp
index 63a02925bf1..efe68c2eda9 100644
--- a/src/osd/modules/file/posixdir.cpp
+++ b/src/osd/modules/file/posixdir.cpp
@@ -193,7 +193,7 @@ bool posix_directory::open_impl(std::string const &dirname)
{
assert(!m_fd);
- osd_subst_env(m_path, dirname);
+ m_path = osd_subst_env(dirname);
m_fd.reset(::opendir(m_path.c_str()));
return bool(m_fd);
}
@@ -224,7 +224,7 @@ directory::ptr directory::open(std::string const &dirname)
// osd_subst_env
//============================================================
-void osd_subst_env(std::string &dst, std::string const &src)
+std::string osd_subst_env(std::string_view src)
{
std::string result, var;
auto start = src.begin();
@@ -292,5 +292,5 @@ void osd_subst_env(std::string &dst, std::string const &src)
}
}
- dst = std::move(result);
+ return result;
}