nemo r17 - in trunk: . metadata
- From: arj svn gnome org
- To: svn-commits-list gnome org
- Subject: nemo r17 - in trunk: . metadata
- Date: Mon, 7 Jan 2008 10:33:24 +0000 (GMT)
Author: arj
Date: Mon Jan 7 10:33:24 2008
New Revision: 17
URL: http://svn.gnome.org/viewvc/nemo?rev=17&view=rev
Log:
Fix bug that caused a crash
Modified:
trunk/NEWS
trunk/metadata/MetadataStore.cs
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Jan 7 10:33:24 2008
@@ -3,6 +3,7 @@
- Support Beagle through the Xesam adaptor
- Fix indexing so it doesn't kill the machine
+- Fix bug that caused a crash in metadata store
0.1.2 alpha
-----------
Modified: trunk/metadata/MetadataStore.cs
==============================================================================
--- trunk/metadata/MetadataStore.cs (original)
+++ trunk/metadata/MetadataStore.cs Mon Jan 7 10:33:24 2008
@@ -427,8 +427,6 @@
db_work.RemoveFirst();
}
}
-
-
if (item == null) {
@@ -502,7 +500,7 @@
bool was_in_query = database.file_path_is_in_query(path, current_query);
long filetype_id = db_determine_filetype_id(path);
-
+
bool id_found = false;
long id = database.get_file_id(path, out id_found);
@@ -1053,6 +1051,8 @@
public void add_file(string path, DateTime last_accessed,
DateTime last_modified, long size, long filetype_id)
{
+// System.Console.WriteLine("inserting {0}", path);
+
using (IDbCommand cmd = get_command()) {
cmd.CommandText = "insert into files (path, last_accessed, last_modified, size, type, starred) " +
"values (@path, @last_accessed, @last_modified, @size, @filetype_id, 0)";
@@ -1063,7 +1063,6 @@
add_par(cmd, "@last_modified", DbType.Int64, last_modified.ToFileTime());
add_par(cmd, "@size", DbType.Int64, size);
add_par(cmd, "@filetype_id", DbType.Int64, filetype_id);
-// System.Console.WriteLine("inserting {0}", path);
cmd.ExecuteNonQuery();
}
}
@@ -1553,7 +1552,7 @@
using (IDbCommand cmd = get_command()) {
construct_query_sql(cmd, query, "files.id", "files.path = @Xpath");
- add_par(cmd, "@Xpath", DbType.Int64, path);
+ add_par(cmd, "@Xpath", DbType.String, path);
using (IDataReader reader = cmd.ExecuteReader())
if (reader.Read())
return true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]