[f-spot] Avoid exception when thumbnailed file is missing.
- From: Ruben Vermeersch <rubenv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot] Avoid exception when thumbnailed file is missing.
- Date: Mon, 14 Jun 2010 21:26:01 +0000 (UTC)
commit a8001d1288b7cb2f87f60d7f32a39064c7e7a48e
Author: Ruben Vermeersch <ruben savanne be>
Date: Mon Jun 14 23:25:30 2010 +0200
Avoid exception when thumbnailed file is missing.
src/Utils/XdgThumbnailSpec.cs | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/Utils/XdgThumbnailSpec.cs b/src/Utils/XdgThumbnailSpec.cs
index c9eabf9..1d0850f 100644
--- a/src/Utils/XdgThumbnailSpec.cs
+++ b/src/Utils/XdgThumbnailSpec.cs
@@ -111,6 +111,9 @@ namespace FSpot.Utils
}
var file = GLib.FileFactory.NewForUri (uri);
+ if (!file.Exists)
+ return false;
+
var info = file.QueryInfo ("time::modified", GLib.FileQueryInfoFlags.None, null);
if (pixbuf.GetOption (ThumbMTimeOpt) != info.GetAttributeULong ("time::modified").ToString ()) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]