mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-02-24 00:29:58 -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;
|
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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user