diff -Naur -x .git libgpod/src/itdb_itunesdb.c libgpod.new/src/itdb_itunesdb.c
--- libgpod/src/itdb_itunesdb.c	2010-03-22 13:29:00.070391275 +0100
+++ libgpod.new/src/itdb_itunesdb.c	2010-03-22 14:42:39.420431604 +0100
@@ -416,11 +416,26 @@
 gchar * itdb_resolve_path (const gchar *root,
 			   const gchar * const * components)
 {
-  gchar *good_path = g_strdup(root);
+  gchar *good_path;
   guint32 i;
+  gchar *absolute_path;
+  gchar *rel_path;
 
   if (!root) return NULL;
 
+  rel_path = g_build_filenamev ((gchar **)components);
+  absolute_path = g_build_filename (root, rel_path, NULL);
+  g_free (rel_path);
+  if (g_file_test (absolute_path, G_FILE_TEST_EXISTS)) {
+    return absolute_path;
+  }
+  g_free (absolute_path);
+
+  if (g_strrstr(root, ".gvfs")) 
+    return NULL;
+
+  good_path = g_strdup(root);
+
   for(i = 0 ; components[i] ; i++) {
     GDir *cur_dir;
     gchar *component_as_filename;
diff -Naur -x .git libgpod/src/ithumb-writer.c libgpod.new/src/ithumb-writer.c
--- libgpod/src/ithumb-writer.c	2010-03-22 13:29:00.080393126 +0100
+++ libgpod.new/src/ithumb-writer.c	2010-03-22 13:45:54.131641038 +0100
@@ -1406,6 +1406,7 @@
 {
     GList *gl;
     GHashTable *filenamehash;
+    GHashTable *resolvehash;
     gboolean result = TRUE;
     GList *thumbs;
     gint i;
@@ -1418,6 +1419,8 @@
     filenamehash = g_hash_table_new_full (g_str_hash, g_str_equal, 
 					  g_free, NULL);
 
+    resolvehash = g_hash_table_new_full (g_str_hash, g_str_equal, 
+					  g_free, NULL);
     /* Create a hash with all filenames used for thumbnails.
        This will usually be a number of "F%d_%d.ithmb" files. A
        GList is kept with pointers to all images in a given file which
@@ -1441,47 +1444,54 @@
 			       written */
 			    continue;
 			}
-                        if (thumb->data_type == ITDB_THUMB_TYPE_IPOD) {
-                            Itdb_Thumb_Ipod_Item *item;
-                            item = itdb_thumb_ipod_get_item_by_type (thumb,
-                                                                     info);
-                            if (item) {
-				filename = itdb_thumb_ipod_get_filename (
-				        db_get_device(db),
-				        item);
-				if (filename)
-				{
-					thumbs = g_hash_table_lookup (filenamehash, filename);
-					thumbs = g_list_append (thumbs, item);
-					g_hash_table_insert (filenamehash, filename, thumbs);
-				}
-                            }
-                        }
+            if (thumb->data_type == ITDB_THUMB_TYPE_IPOD) {
+                Itdb_Thumb_Ipod_Item *item;
+                item = itdb_thumb_ipod_get_item_by_type (thumb, info);
+                if (item) {
+                    filename = g_hash_table_lookup (resolvehash, item->filename);
+                    if (!filename) {
+                            filename = itdb_thumb_ipod_get_filename (
+                                    db_get_device(db),
+                                    item);
+                    }
+                    if (filename)
+                    {
+                        g_hash_table_insert (resolvehash, strdup(item->filename), filename);
+                        thumbs = g_hash_table_lookup (filenamehash, filename);
+                        thumbs = g_list_append (thumbs, item);
+                        g_hash_table_insert (filenamehash, g_strdup(filename), thumbs);
+                    }
                 }
+            }
+        }
 		break;
     case DB_TYPE_PHOTO:
 	for (gl=db_get_photodb(db)->photos; gl; gl=gl->next)
 	{
 		Itdb_Artwork *artwork = gl->data;
 		Itdb_Thumb *thumb = artwork->thumbnail;
-                if (thumb == NULL) {
-                    continue;
+        if (thumb == NULL) {
+            continue;
+        }
+        if (thumb->data_type == ITDB_THUMB_TYPE_IPOD) {
+            Itdb_Thumb_Ipod_Item *item;
+            item = itdb_thumb_ipod_get_item_by_type (thumb, info);
+            if (item) {
+                filename = g_hash_table_lookup (resolvehash, item->filename);
+                if (!filename) {
+                        filename = itdb_thumb_ipod_get_filename (
+                                db_get_device(db),
+                                item);
                 }
-                if (thumb->data_type == ITDB_THUMB_TYPE_IPOD) {
-                    Itdb_Thumb_Ipod_Item *item;
-                    item = itdb_thumb_ipod_get_item_by_type (thumb, info);
-                    if (item) 
-                    {
-			filename = itdb_thumb_ipod_get_filename (
-			        db_get_device (db), item);
-			if (filename)
-			{
-				thumbs = g_hash_table_lookup (filenamehash, filename);
-				thumbs = g_list_append (thumbs, item);
-				g_hash_table_insert (filenamehash, filename, thumbs);
-			}
-                    } 
+                if (filename)
+                {
+                    g_hash_table_insert (resolvehash, strdup(item->filename), filename);
+                    thumbs = g_hash_table_lookup (filenamehash, filename);
+                    thumbs = g_list_append (thumbs, item);
+                    g_hash_table_insert (filenamehash, g_strdup(filename), thumbs);
                 }
+            }
+        }
 	}
 	break;
     default:
