From: Oleg Broytman Date: Sat, 11 Jan 2025 16:54:57 +0000 (+0300) Subject: mc: Limit the year to 9999 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=mc%2Fextfs.d.git mc: Limit the year to 9999 Fix a problem with torrents that set creation_date too far in the future. --- diff --git a/torrent b/torrent index 466da30..ca38935 100755 --- a/torrent +++ b/torrent @@ -36,7 +36,7 @@ The filesystem is, naturally, read-only. """ -__version__ = "1.4.0" +__version__ = "1.4.1" __author__ = "Oleg Broytman " __copyright__ = "Copyright (C) 2010-2025 PhiloSoft Design" __license__ = "GPL" @@ -421,8 +421,9 @@ def decode_datetime(dt): Y, m, d, H, M = localtime(float(dt))[0:5] except ValueError: return datetime.max.ctime() - else: - return "%02d-%02d-%d %02d:%02d" % (m, d, Y, H, M) + if Y > 9999: + Y = 9999 + return "%02d-%02d-%d %02d:%02d" % (m, d, Y, H, M) def decode_announce_list(announce): diff --git a/torrent-ANNOUNCE b/torrent-ANNOUNCE index c99a7e8..6cfe1f1 100644 --- a/torrent-ANNOUNCE +++ b/torrent-ANNOUNCE @@ -8,6 +8,11 @@ Midnight Commander. WHAT'S NEW +Version 1.4.1 (2025-01-11) + + Fix a problem with torrents that set creation_date too far in the future: + limit the year to 9999. + Version 1.4.0 (2025-01-11) Include eff_bdecode.py into the code. diff --git a/torrent-ChangeLog b/torrent-ChangeLog index 7337285..5157f0c 100644 --- a/torrent-ChangeLog +++ b/torrent-ChangeLog @@ -1,3 +1,8 @@ +Version 1.4.1 (2025-01-11) + + Fix a problem with torrents that set creation_date too far in the future: + limit the year to 9999. + Version 1.4.0 (2025-01-11) Include eff_bdecode.py into the code.