# HG changeset patch # User Richard Laager # Date 1137777894 0 # Node ID b98a28bf29d9f36f52fc17b19b257eb581d5737c # Parent 384661a6ead66abcc44433527da17f3fe17e13d1 [gaim-migrate @ 15322] Checking that the filename (w/o extension) is == 17 characters is a bit restrictive. I'm making this a little more future-proof by checking that the filename is >= 17 characters. I may be appending a timezone designator to the filename at a later point in time, and I'd like those logs readable by all 2.x.y versions of Gaim. committer: Tailor Script diff -r 384661a6ead6 -r b98a28bf29d9 src/log.c --- a/src/log.c Fri Jan 20 03:57:44 2006 +0000 +++ b/src/log.c Fri Jan 20 17:24:54 2006 +0000 @@ -649,14 +649,17 @@ if (path == NULL) return NULL; - if (!(dir = g_dir_open(path, 0, NULL))) { + if (!(dir = g_dir_open(path, 0, NULL))) + { g_free(path); return NULL; } - while ((filename = g_dir_read_name(dir))) { + while ((filename = g_dir_read_name(dir))) + { if (gaim_str_has_suffix(filename, ext) && - strlen(filename) == 17 + strlen(ext)) { + strlen(filename) >= (17 + strlen(ext))) + { GaimLog *log; GaimLogCommonLoggerData *data; time_t stamp = gaim_str_to_time(filename, FALSE);