changeset 12969:b98a28bf29d9

[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 <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 20 Jan 2006 17:24:54 +0000
parents 384661a6ead6
children ec9b92104904
files src/log.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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);