diff --git a/src/cache_files.cpp b/src/cache_files.cpp index 06700ae..fd84fba 100644 --- a/src/cache_files.cpp +++ b/src/cache_files.cpp @@ -28,7 +28,7 @@ gemini::CacheFiles::CacheFiles(const std::filesystem::path &folder, const Inform // I want to have the filename and not the whole path to be stored (less characters, less memory used). const std::string filename = [&]() -> std::string { - const std::string_view path = iterator.path().string(); + const auto path = iterator.path().string(); const std::size_t pos = path.rfind('/'); return iterator.path().string().substr(pos != std::string::npos ? pos + 1 : pos); }();