f-spot r4082 - trunk/src



Author: sdelcroix
Date: Mon Jun 23 14:27:31 2008
New Revision: 4082
URL: http://svn.gnome.org/viewvc/f-spot?rev=4082&view=rev

Log:
patch for bgo 539348

Modified:
   trunk/src/PhotoStore.cs

Modified: trunk/src/PhotoStore.cs
==============================================================================
--- trunk/src/PhotoStore.cs	(original)
+++ trunk/src/PhotoStore.cs	Mon Jun 23 14:27:31 2008
@@ -575,7 +575,7 @@
 	[Obsolete ("No longer make any sense with uris...")]
 	public Photo [] Query (System.IO.DirectoryInfo dir)
 	{
-		string query_string = String.Format (
+		return Query (new DbCommand (
 			"SELECT photos.id, "			+
 				"photos.time, "			+
 				"photos.uri, "			+
@@ -584,10 +584,9 @@
 				"photos.default_version_id, "	+
 				"photos.rating "		+
 			"FROM photos " 				+
-			"WHERE uri LIKE \"file://{0}%\" "	+
-			"AND uri NOT LIKE \"file://{0}/%/%\"" , dir.FullName);
-
-		return Query (query_string);
+			"WHERE uri LIKE \"file://:dir%\" "	+
+			"AND uri NOT LIKE \"file://:dir/%/%\"",
+			"dir", dir.FullName ));
 	}
 
 	[Obsolete ("drop this, use IQueryCondition correctly instead")]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]