[f-spot] Revert "Always dispose ImageFile streams."



commit 72cf8e13fff184ed7c70e5d3a8d58f831ea97294
Author: Ruben Vermeersch <ruben savanne be>
Date:   Sun Jun 13 17:32:31 2010 +0200

    Revert "Always dispose ImageFile streams."
    
    Breaks loading of full-size images.

 src/Imaging/ImageFile.cs |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/Imaging/ImageFile.cs b/src/Imaging/ImageFile.cs
index 8e1157b..dab045a 100644
--- a/src/Imaging/ImageFile.cs
+++ b/src/Imaging/ImageFile.cs
@@ -23,7 +23,6 @@ namespace FSpot {
 
 		static Hashtable name_table;
 		internal static Hashtable NameTable { get { return name_table; } }
-		Stream stream = null;
 		
 		public ImageFile (SafeUri uri)
 		{
@@ -38,8 +37,9 @@ namespace FSpot {
 		protected Stream Open ()
 		{
 			Log.DebugFormat ("open uri = {0}", uri.ToString ());
-			stream = new GLib.GioStream (GLib.FileFactory.NewForUri (uri).Read (null));
-			return stream;
+//			if (uri.IsFile)
+//				return new FileStream (uri.LocalPath, FileMode.Open);
+			return new GLib.GioStream (GLib.FileFactory.NewForUri (uri).Read (null));
 		}
 
 		public virtual Stream PixbufStream ()
@@ -237,8 +237,6 @@ namespace FSpot {
 
 		public void Dispose ()
 		{
-			if (stream != null)
-				stream.Close ();
 			Close ();
 			System.GC.SuppressFinalize (this);
 		}



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