f-spot r4608 - in trunk: . src
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4608 - in trunk: . src
- Date: Sat, 22 Nov 2008 09:43:40 +0000 (UTC)
Author: sdelcroix
Date: Sat Nov 22 09:43:39 2008
New Revision: 4608
URL: http://svn.gnome.org/viewvc/f-spot?rev=4608&view=rev
Log:
insert null instead of string.empty as md5sum
2008-11-22 Stephane Delcroix <sdelcroix novell com>
* src/PhotoStore.cs: do not insert empty strings as md5 in db, use null
instead. Patch from maxxer.
Modified:
trunk/ChangeLog
trunk/src/PhotoStore.cs
Modified: trunk/src/PhotoStore.cs
==============================================================================
--- trunk/src/PhotoStore.cs (original)
+++ trunk/src/PhotoStore.cs Sat Nov 22 09:43:39 2008
@@ -202,7 +202,7 @@
"roll_id", roll_id,
"default_version_id", Photo.OriginalVersionId,
"rating", "0",
- "md5_sum", md5_sum
+ "md5_sum", (md5_sum != String.Empty ? md5_sum : null)
)
);
@@ -544,7 +544,7 @@
"time", DbUtils.UnixTimeFromDateTime (photo.Time),
"uri", photo.VersionUri (Photo.OriginalVersionId).OriginalString,
"rating", String.Format ("{0}", photo.Rating),
- "md5_sum", photo.MD5Sum,
+ "md5_sum", (photo.MD5Sum != String.Empty ? photo.MD5Sum : null),
"id", photo.Id
)
);
@@ -584,7 +584,7 @@
"name", version.Name,
"uri", version.Uri.ToString (),
"is_protected", version.IsProtected,
- "md5_sum", version.MD5Sum));
+ "md5_sum", (version.MD5Sum != String.Empty ? version.MD5Sum : null)));
}
if (changes.VersionsModified != null)
foreach (uint version_id in changes.VersionsModified) {
@@ -597,7 +597,7 @@
"uri", version.Uri.ToString (),
"protected", version.IsProtected,
"photo_id", photo.Id,
- "md5_sum", version.MD5Sum,
+ "md5_sum", (version.MD5Sum != String.Empty ? version.MD5Sum : null),
"version_id", version_id));
}
photo.Changes = null;
@@ -613,7 +613,7 @@
"UPDATE photos " +
"SET md5_sum = :md5_sum " +
"WHERE ID = :id",
- "md5_sum", md5_sum,
+ "md5_sum", (md5_sum != String.Empty ? md5_sum : null),
"id", photo.Id
)
);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]