[babl] babl.db: if git hash has changed, drop cache
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl.db: if git hash has changed, drop cache
- Date: Mon, 14 Nov 2016 19:48:10 +0000 (UTC)
commit b3730a3429972561c3eb7a68607b32b47da0e62c
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Nov 14 20:47:39 2016 +0100
babl.db: if git hash has changed, drop cache
babl/babl.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/babl/babl.c b/babl/babl.c
index 3199777..22c104c 100644
--- a/babl/babl.c
+++ b/babl/babl.c
@@ -296,6 +296,12 @@ static void babl_init_db (const char *path)
babl=NULL;
break;
case '#':
+ /* if babl has changed in git .. drop whole cache */
+ if (strcmp ( &token[1], BABL_GIT_VERSION))
+ {
+ free (contents);
+ return;
+ }
break;
case '\t':
if (strchr (token, '='))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]