[gthumb] Check that the fd->local_path has ".gvfs" in it



commit 54615611e93a62380f38eea609de007b16f001a1
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Thu May 7 13:50:02 2009 -0400

    Check that the fd->local_path has ".gvfs" in it
---
 libgthumb/file-data.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/libgthumb/file-data.c b/libgthumb/file-data.c
index 9e261f2..83d0588 100644
--- a/libgthumb/file-data.c
+++ b/libgthumb/file-data.c
@@ -68,6 +68,14 @@ load_info (FileData *fd)
 	g_free (fd->local_path);
 	fd->local_path = g_file_get_path (gfile);
 
+	if ( !is_local_file (fd->utf8_path) && ! strstr (fd->local_path, ".gvfs")) {
+		/* This can happen when running gThumb over ssh with X-forwarding.
+		   I don't know why, exactly. Possibly a gio bug. */
+		g_warning ("Unexpected error: %s is not a valid mount point for %s",fd->local_path,fd->utf8_path);
+		g_free (fd->local_path);
+		fd->local_path = NULL;
+	}
+
 	info = g_file_query_info (gfile, 
 				  G_FILE_ATTRIBUTE_STANDARD_SIZE ","
 				  G_FILE_ATTRIBUTE_TIME_CHANGED ","



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