aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/tarfile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/tarfile.cc')
-rw-r--r--src/libutil/tarfile.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/tarfile.cc b/src/libutil/tarfile.cc
index 2cc7793fd..262bc655f 100644
--- a/src/libutil/tarfile.cc
+++ b/src/libutil/tarfile.cc
@@ -17,7 +17,7 @@ void unpackTarfile(Source & source, const Path & destDir)
void unpackTarfile(const Path & tarFile, const Path & destDir,
std::optional<std::string> baseName)
{
- if (!baseName) baseName = baseNameOf(tarFile);
+ if (!baseName) baseName = std::string(baseNameOf(tarFile));
auto source = sinkToSource([&](Sink & sink) {
// FIXME: look at first few bytes to determine compression type.