[maemo-commits] [maemo-commits] r16735 - projects/haf/trunk/hildon-thumbnail/daemon/plugins
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Nov 18 14:32:57 EET 2008
- Previous message: [maemo-commits] r16734 - projects/haf/trunk/hildon-thumbnail/daemon/plugins
- Next message: [maemo-commits] r16736 - in projects/haf/trunk/hildon-thumbnail/daemon: . plugins
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: pvanhoof Date: 2008-11-18 14:32:56 +0200 (Tue, 18 Nov 2008) New Revision: 16735 Modified: projects/haf/trunk/hildon-thumbnail/daemon/plugins/gdkpixbuf-jpeg-out-plugin.c Log: Bugfix Modified: projects/haf/trunk/hildon-thumbnail/daemon/plugins/gdkpixbuf-jpeg-out-plugin.c =================================================================== --- projects/haf/trunk/hildon-thumbnail/daemon/plugins/gdkpixbuf-jpeg-out-plugin.c 2008-11-18 12:27:24 UTC (rev 16734) +++ projects/haf/trunk/hildon-thumbnail/daemon/plugins/gdkpixbuf-jpeg-out-plugin.c 2008-11-18 12:32:56 UTC (rev 16735) @@ -74,15 +74,15 @@ } if (db) { - const unsigned char *path; - const unsigned char *uri; - guint64 mtime; - gchar *sql = g_strdup_printf ("select Path, MTime, URI from jpegthumbnails where URI LIKE '%s%'", - path); + gchar *sql = g_strdup_printf ("select Path from jpegthumbnails where URI LIKE '%s%' AND MTime <= %d", + uri_match, since); sqlite3_prepare_v2 (db, sql, -1, &stmt, NULL); g_free (sql); while (result == SQLITE_OK || result == SQLITE_ROW || result == SQLITE_BUSY) { + gchar *dsql; + const unsigned char *path; + result = sqlite3_step (stmt); if (result == SQLITE_ERROR) { @@ -98,16 +98,11 @@ } path = sqlite3_column_text (stmt, 0); - mtime = sqlite3_column_int64 (stmt, 1); - uri = sqlite3_column_text (stmt, 2); - - if (mtime <= since) { - sql = g_strdup_printf ("delete from jpegthumbnails where Path = '%s'", - path); - sqlite3_exec (db, sql, callback, 0, NULL); - g_free (sql); - g_unlink (path); - } + dsql = g_strdup_printf ("delete from jpegthumbnails where Path = '%s'", + path); + sqlite3_exec (db, dsql, callback, 0, NULL); + g_free (dsql); + g_unlink (path); } } #endif
- Previous message: [maemo-commits] r16734 - projects/haf/trunk/hildon-thumbnail/daemon/plugins
- Next message: [maemo-commits] r16736 - in projects/haf/trunk/hildon-thumbnail/daemon: . plugins
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]