[f-spot] yet another Vfs ref trashed



commit 99af9ff15b63cf03b3cdd659271c8e8b01a4d51d
Author: Stephane Delcroix <stephane delcroix org>
Date:   Tue Sep 15 14:34:16 2009 +0200

    yet another Vfs ref trashed

 src/Imaging/ImageFile.cs |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/Imaging/ImageFile.cs b/src/Imaging/ImageFile.cs
index f898d02..e0e0ee2 100644
--- a/src/Imaging/ImageFile.cs
+++ b/src/Imaging/ImageFile.cs
@@ -6,6 +6,9 @@ using FSpot.Utils;
 using Mono.Unix;
 using Gdk;
 
+using GFile = GLib.File;
+using GFileInfo = GLib.FileInfo;
+
 namespace FSpot {
 	public class ImageFormatException : ApplicationException {
 		public ImageFormatException (string msg) : base (msg)
@@ -167,10 +170,10 @@ namespace FSpot {
 			get {
 				// FIXME mono uses the file change time (ctime) incorrectly
 				// as the creation time so we try to work around that slightly
-				Gnome.Vfs.FileInfo info = new Gnome.Vfs.FileInfo (uri.ToString ());
-
-				DateTime create = info.Ctime;
-				DateTime write = info.Mtime;
+				GFile file = GLib.FileFactory.NewForUri (uri);
+				GFileInfo file_info = file.QueryInfo ("time::*", GLib.FileQueryInfoFlags.None, null);
+				DateTime create = file_info.CreationTime;
+				DateTime write = file_info.ModificationTime;
 
 				if (create < write)
 					return create;



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