From 9e8128ecb5c1ef860d2585a22beb4cf6337314f1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 16 May 2024 13:39:58 +0200 Subject: [PATCH] lib/nfs/FileReader: convert `path` to std::string --- src/lib/nfs/FileReader.cxx | 2 +- src/lib/nfs/FileReader.hxx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/nfs/FileReader.cxx b/src/lib/nfs/FileReader.cxx index da045332f..d75d08811 100644 --- a/src/lib/nfs/FileReader.cxx +++ b/src/lib/nfs/FileReader.cxx @@ -156,7 +156,7 @@ NfsFileReader::OnNfsConnectionReady() noexcept assert(state == State::MOUNT); try { - connection->Open(path, O_RDONLY, *this); + connection->Open(path.c_str(), O_RDONLY, *this); } catch (...) { OnNfsFileError(std::current_exception()); return; diff --git a/src/lib/nfs/FileReader.hxx b/src/lib/nfs/FileReader.hxx index 914f3e1c8..37c8c3b49 100644 --- a/src/lib/nfs/FileReader.hxx +++ b/src/lib/nfs/FileReader.hxx @@ -43,8 +43,7 @@ class NfsFileReader : NfsLease, NfsCallback { State state = State::INITIAL; - std::string server, export_name; - const char *path; + std::string server, export_name, path; NfsConnection *connection;