[gthumb] GIO Fix bookmarks to unmounted locations
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] GIO Fix bookmarks to unmounted locations
- Date: Thu, 4 Jun 2009 11:47:09 -0400 (EDT)
commit 346e044094b6aac1a17ecce0c4ccc7887827202c
Author: Marlodavampire <brooss teambb gmail com>
Date: Thu Jun 4 23:40:30 2009 +1000
GIO Fix bookmarks to unmounted locations
---
src/gth-browser.c | 33 +++++++++++++++++++--------------
1 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/src/gth-browser.c b/src/gth-browser.c
index 64b6b7f..67fa974 100644
--- a/src/gth-browser.c
+++ b/src/gth-browser.c
@@ -6192,22 +6192,27 @@ dir_list_done_cb (GthDirList *dir_list,
set_cursor_not_busy (browser, TRUE);
priv->refreshing = FALSE;
- /* Go up a level one by one until a directory exists. */
-
parent_dir = g_strdup (dir_list->try_path);
- do {
- char *tmp = parent_dir;
- parent_dir = remove_level_from_path (tmp);
- g_free (tmp);
- } while ((parent_dir != NULL) && ! path_is_dir (parent_dir));
-
- if (parent_dir != NULL) {
- gth_browser_go_to_directory (browser, parent_dir);
- g_free (parent_dir);
- }
- else
+
+ /* Go up a level one by one until a directory exists
+ * (but only for local dirs). */
+ if(!is_local_file(parent_dir)) {
gth_browser_go_to_directory (browser, "file:///");
-
+ }
+ else {
+ do {
+ char *tmp = parent_dir;
+ parent_dir = remove_level_from_path (tmp);
+ g_free (tmp);
+ } while ((parent_dir != NULL) && ! path_is_dir (parent_dir));
+
+ if (parent_dir != NULL) {
+ gth_browser_go_to_directory (browser, parent_dir);
+ g_free (parent_dir);
+ }
+ else
+ gth_browser_go_to_directory (browser, "file:///");
+ }
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]