mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-21 05:07:41 +00:00
File: Stop copying path when iterating.
TODO: I bet I've made this mistake a billion other places...
This commit is contained in:
@@ -130,7 +130,7 @@ static std::filesystem::path find_last_file_matching_pattern(const std::filesyst
|
|||||||
std::filesystem::path last_match;
|
std::filesystem::path last_match;
|
||||||
for(const auto& entry : std::filesystem::directory_iterator(u"", pattern)) {
|
for(const auto& entry : std::filesystem::directory_iterator(u"", pattern)) {
|
||||||
if( std::filesystem::is_regular_file(entry.status()) ) {
|
if( std::filesystem::is_regular_file(entry.status()) ) {
|
||||||
const auto match = entry.path();
|
const auto& match = entry.path();
|
||||||
if( match > last_match ) {
|
if( match > last_match ) {
|
||||||
last_match = match;
|
last_match = match;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user