diff -Nurd -x'*~' gpdf-2.10.0.orig/shell/eel-vfs-extensions.c gpdf-2.10.0/shell/eel-vfs-extensions.c --- gpdf-2.10.0.orig/shell/eel-vfs-extensions.c 2003-12-29 15:14:14.000000000 -0500 +++ gpdf-2.10.0/shell/eel-vfs-extensions.c 2005-09-21 12:42:46.000000000 -0400 @@ -48,6 +48,11 @@ #include #include +/* needed for stat() */ +#include +#include +#include + #define READ_CHUNK_SIZE 8192 struct EelReadFileHandle { @@ -986,6 +991,7 @@ eel_make_uri_from_shell_arg (const char *location) { char *uri; + struct stat info; g_return_val_if_fail (location != NULL, g_strdup ("")); @@ -997,7 +1003,8 @@ uri = gnome_vfs_get_uri_from_local_path (location); break; default: - if (has_valid_scheme (location)) { + /* stat() returns 0 if the file is readable */ + if (stat(location, &info) && has_valid_scheme (location)) { uri = g_strdup (location); } else { uri = file_uri_from_local_relative_path (location); diff -Nurd -x'*~' gpdf-2.10.0.orig/xpdf/gpdf-thumbnails-view.cc gpdf-2.10.0/xpdf/gpdf-thumbnails-view.cc --- gpdf-2.10.0.orig/xpdf/gpdf-thumbnails-view.cc 2004-08-02 10:17:44.000000000 -0400 +++ gpdf-2.10.0/xpdf/gpdf-thumbnails-view.cc 2005-09-21 12:40:52.000000000 -0400 @@ -344,7 +344,7 @@ if (y) { *y = GPDF_THUMBNAILS_MARGIN_TOP + - (uint)((page -1) / priv->page_per_row) * + (guint)((page -1) / priv->page_per_row) * (priv->max_page_height + GPDF_THUMBNAILS_ROW_SEP + GPDF_THUMBNAILS_TEXT_HEIGHT + GPDF_THUMBNAILS_INNER_MARGIN_BOTTOM +