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