From 74eb36b4312d1a235049b78da646cf1b8a81e0b7 Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 24 Nov 2005 09:53:43 +0000 Subject: r805@narval2: dakkar | 2005-11-20 12:08:57 +0100 distingue tra file e directory on-dbl-click, e nel dialog ora funziona Invio git-svn-id: svn://luxion/repos/GtkPerlFileManager/trunk@50 fcb26f47-9200-0410-b104-b98ab5b095f3 --- lib/LDFM/MainController.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/LDFM/MainController.pm') diff --git a/lib/LDFM/MainController.pm b/lib/LDFM/MainController.pm index 31b45da..76818cf 100644 --- a/lib/LDFM/MainController.pm +++ b/lib/LDFM/MainController.pm @@ -105,8 +105,13 @@ sub use_a_row { my ($row_num)=$tree_path->get_indices(); my $row_ref=$self->{"${side}_data"}->[$row_num]; my $relpath=$row_ref->[0]; - - $self->update_list_with_path($side,$relpath); + my $abspath=dir($relpath)->absolute($self->{"cur_${side}_path"})->cleanup; + if (-d $abspath) { + $self->update_list_with_path($side,$relpath); + } + else { + warn "Aprirei il file $abspath\n"; + } } sub use_left_row { -- cgit v1.2.3