f-spot r4319 - in trunk: . src src/Core
- From: thomasvm svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4319 - in trunk: . src src/Core
- Date: Wed, 10 Sep 2008 16:10:09 +0000 (UTC)
Author: thomasvm
Date: Wed Sep 10 16:10:08 2008
New Revision: 4319
URL: http://svn.gnome.org/viewvc/f-spot?rev=4319&view=rev
Log:
Cleanup files when duplicate, add some debug
Modified:
trunk/ChangeLog
trunk/src/Core/Photo.cs
trunk/src/FileImportBackend.cs
Modified: trunk/src/Core/Photo.cs
==============================================================================
--- trunk/src/Core/Photo.cs (original)
+++ trunk/src/Core/Photo.cs Wed Sep 10 16:10:08 2008
@@ -645,10 +645,14 @@
return md5_cache [uri];
}
+ Log.DebugFormat("Creating thumbnail for {0}", uri);
using (Gdk.Pixbuf pixbuf = ThumbnailGenerator.Create (uri))
{
+ Log.DebugFormat("Created thumbnail, now serializing for {0}, ", uri);
byte[] serialized = PixbufSerializer.Serialize (pixbuf);
+ Log.DebugFormat("Serialized, now hashing for {0}, ", uri);
byte[] md5 = MD5Generator.ComputeHash (serialized);
+ Log.DebugFormat("Hashed for {0}, ", uri);
string md5_string = Convert.ToBase64String (md5);
md5_cache.Add (uri, md5_string);
Modified: trunk/src/FileImportBackend.cs
==============================================================================
--- trunk/src/FileImportBackend.cs (original)
+++ trunk/src/FileImportBackend.cs Wed Sep 10 16:10:08 2008
@@ -251,6 +251,7 @@
else
{
is_duplicate = true;
+ System.IO.File.Delete (destination);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]