Little mistake

This commit is contained in:
Pcornat 2021-03-23 21:50:26 +01:00
parent 9a73b3ce2b
commit a4125d8edf
No known key found for this signature in database
GPG Key ID: 873C3ACCF970C74E
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}();