Skip to content

Commit e97feda

Browse files
committed
fix: 限制清理范围
1 parent 8d37a30 commit e97feda

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

source/Logger/Logger.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ static void remove_old_files(const std::filesystem::path& dir)
131131
continue;
132132
}
133133

134+
const auto ext = path_to_utf8_string(entry.path().extension());
135+
if (ext != ".log" && ext != ".jpg" && ext != ".png") {
136+
continue;
137+
}
138+
134139
auto last_write = entry.last_write_time(ec);
135140
if (ec) {
136141
continue;

0 commit comments

Comments
 (0)