ITADN

Clamp folder history limit to prevent infinite pruning loops

#1578Pull RequestPeterDaveHello 创建于 12 天前
codexReview effort 1/5aardvark
P
PeterDaveHellocommented
### Motivation If an imported or externally modified INI file sets `MaxFoldersHistory` to zero or a negative value, the directory history pruning loop in `DeleteDirs` may fail to terminate. ### Description - Clamp `MaxFoldersHistory` to a minimum of `10` in both `TMainForm.DeleteDirs` and `TAddTorrentForm.DeleteDirs`. - Write the corrected value back to the INI file. - Ensure directory history pruning always operates with a valid positive limit. ### Testing - Verified pruning behavior with zero, negative, and valid `MaxFoldersHistory` values. - Confirmed that invalid values are normalized to `10` before pruning begins.
合并状态:未合并 5 条评论