From 3bcb4f47465556ef32812737762fac88b77ffbab Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Wed, 7 Oct 2009 12:07:53 +0000 Subject: [PATCH] handle modified dir date of 0 SVN revision: 42936 --- src/lib/image.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/image.c b/src/lib/image.c index 318d628..2cb7a1a 100644 --- a/src/lib/image.c +++ b/src/lib/image.c @@ -726,6 +726,7 @@ __imlib_RescanLoaders(void) { static time_t last_scan_time = 0; static time_t last_modified_system_time = 0; + static int scanned = 0; time_t current_time; char do_reload = 0; @@ -747,7 +748,7 @@ __imlib_RescanLoaders(void) current_time = __imlib_FileModDate(__XOS2RedirRoot(SYS_LOADERS_PATH "/loaders/")); #endif - if (current_time > last_modified_system_time) + if ((current_time > last_modified_system_time) || (!scanned)) { /* yup - set the "do_reload" flag */ do_reload = 1; @@ -759,6 +760,7 @@ __imlib_RescanLoaders(void) return; __imlib_RemoveAllLoaders(); __imlib_LoadAllLoaders(); + scanned = 1; } /* remove all loaders int eh list we have cached so we can re-load them */