[gnome-commander] search: fix for problem with jumping to found files on mounted media
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] search: fix for problem with jumping to found files on mounted media
- Date: Sun, 3 Jul 2011 08:43:15 +0000 (UTC)
commit efea9bd0c19e5d04749d384a606f90364b420f62
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sun Jul 3 10:40:10 2011 +0200
search: fix for problem with jumping to found files on mounted media
src/dialogs/gnome-cmd-search-dialog.cc | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-search-dialog.cc b/src/dialogs/gnome-cmd-search-dialog.cc
index 6203e17..e7e4f72 100755
--- a/src/dialogs/gnome-cmd-search-dialog.cc
+++ b/src/dialogs/gnome-cmd-search-dialog.cc
@@ -1000,13 +1000,18 @@ void GnomeCmdSearchDialog::Private::on_dialog_response(GtkDialog *window, int re
if (!f)
break;
- gchar *fpath = f->get_path();
- gchar *dpath = g_path_get_dirname (fpath);
-
GnomeCmdFileSelector *fs = main_win->fs(ACTIVE);
+ GnomeCmdCon *con = fs->get_connection();
+
+ gchar *fpath = f->get_path();
+ gsize offset = strncmp(fpath, gnome_cmd_con_get_root_path (con), con->root_path->len)==0 ? con->root_path->len : 0;
+ gchar *dpath = g_path_get_dirname (fpath + offset);
if (fs->file_list()->locked)
- fs->new_tab(f->get_parent_dir());
+ {
+ GnomeCmdDir *dir = gnome_cmd_dir_new (con, gnome_cmd_con_create_path (con, dpath));
+ fs->new_tab(dir);
+ }
else
fs->file_list()->goto_directory(dpath);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]