f-spot r4671 - in trunk: . src/Widgets



Author: sdelcroix
Date: Wed Dec 17 12:04:54 2008
New Revision: 4671
URL: http://svn.gnome.org/viewvc/f-spot?rev=4671&view=rev

Log:
no longer crash on missing file

2008-12-17  Stephane Delcroix  <sdelcroix novell com>

	* src/Widgets/IconView.cs: fix the crash on missing files

Modified:
   trunk/ChangeLog
   trunk/src/Widgets/InfoBox.cs

Modified: trunk/src/Widgets/InfoBox.cs
==============================================================================
--- trunk/src/Widgets/InfoBox.cs	(original)
+++ trunk/src/Widgets/InfoBox.cs	Wed Dec 17 12:04:54 2008
@@ -558,8 +558,9 @@
 #else
 					file_size_value_label.Text = Gnome.Vfs.Format.FileSizeForDisplay (file_info.Size);
 #endif
-				} catch (System.IO.FileNotFoundException) {
-					file_size_value_label.Text = Catalog.GetString("(File not found)");
+				} catch (GLib.GException e) {
+					file_size_value_label.Text = Catalog.GetString("(File read error)");
+					FSpot.Utils.Log.DebugException (e);
 				}
 			}
 			
@@ -644,8 +645,9 @@
 						GFile file = FileFactory.NewForUri (photo.DefaultVersionUri);
 						GFileInfo file_info = file.QueryInfo ("standard::size", FileQueryInfoFlags.None, null);
 						file_size += file_info.Size;
-					} catch (System.IO.FileNotFoundException) {
+					} catch (GLib.GException e) {
 						file_size = -1;
+						FSpot.Utils.Log.DebugException (e);
 						break;
 					}
 				}



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