diff --git a/WHATS_NEW b/WHATS_NEW index 9e6cb39ab..197adc30b 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.178 - ===================================== + Use versionsort to fix archive file expiry beyond 100000 files. Add devices/use_aio, aio_max, aio_memory to configure AIO limits. Support asynchronous I/O when scanning devices. Detect asynchronous I/O capability in configure or accept --disable-aio. diff --git a/lib/format_text/archive.c b/lib/format_text/archive.c index 4d4e7ac27..a81a83b57 100644 --- a/lib/format_text/archive.c +++ b/lib/format_text/archive.c @@ -136,8 +136,8 @@ static struct dm_list *_scan_archive(struct dm_pool *mem, dm_list_init(results); - /* Sort fails beyond 5-digit indexes */ - if ((count = scandir(dir, &dirent, NULL, alphasort)) < 0) { + /* Use versionsort to handle numbers beyond 5 digits */ + if ((count = scandir(dir, &dirent, NULL, versionsort)) < 0) { log_error("Couldn't scan the archive directory (%s).", dir); return 0; }