[shotwell] Fix invalid warning on index creation
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Fix invalid warning on index creation
- Date: Fri, 5 Aug 2016 22:13:44 +0000 (UTC)
commit 0e2b2d936a9829fdbf0862de3df7915592ddb935
Author: Jens Georg <mail jensge org>
Date: Sun Jul 24 21:48:42 2016 +0200
Fix invalid warning on index creation
Signed-off-by: Jens Georg <mail jensge org>
src/db/PhotoTable.vala | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/db/PhotoTable.vala b/src/db/PhotoTable.vala
index 7649694..cead338 100644
--- a/src/db/PhotoTable.vala
+++ b/src/db/PhotoTable.vala
@@ -165,7 +165,7 @@ public class PhotoTable : DatabaseTable {
res = db.prepare_v2 ("CREATE UNIQUE INDEX IF NOT EXISTS PhotoTableMD5Format on PhotoTable(md5,
file_format)", -1, out stmt);
assert (res == Sqlite.OK);
res = stmt.step ();
- if (res == Sqlite.DONE) {
+ if (res != Sqlite.DONE) {
DatabaseTable.warning ("Failed to create index on md5 and file_format", res);
}
@@ -173,7 +173,7 @@ public class PhotoTable : DatabaseTable {
res = db.prepare_v2 ("CREATE UNIQUE INDEX IF NOT EXISTS PhotoTableThumbnailMD5Format on
PhotoTable(md5, file_format)", -1, out stmt);
assert (res == Sqlite.OK);
res = stmt.step ();
- if (res == Sqlite.DONE) {
+ if (res != Sqlite.DONE) {
DatabaseTable.warning ("Failed to create index on md5 and file_format", res);
}
@@ -181,7 +181,7 @@ public class PhotoTable : DatabaseTable {
res = db.prepare_v2 ("CREATE UNIQUE INDEX IF NOT EXISTS PhotoTableThumbnailMD5MD5 on
PhotoTable(thumbnail_md5, md5)", -1, out stmt);
assert (res == Sqlite.OK);
res = stmt.step ();
- if (res == Sqlite.DONE) {
+ if (res != Sqlite.DONE) {
DatabaseTable.warning ("Failed to create index on thumbnail_md5 and md5", res);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]