From 8fcd6e39c61b997dcdf177452121dab95201b0ab Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 15 May 2009 17:06:05 +0000 Subject: [PATCH] ebl Fix display of / on bfileview git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8832 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/bweb/cgi/bfileview.pl | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/gui/bweb/cgi/bfileview.pl b/gui/bweb/cgi/bfileview.pl index 7196ea7ac7..fab7d1a8ba 100755 --- a/gui/bweb/cgi/bfileview.pl +++ b/gui/bweb/cgi/bfileview.pl @@ -120,7 +120,7 @@ if ($fnid and $pathid) exit 0; } -} else { +} elsif ($where ne '/') { my $attribs = fv_get_file_attribute($jobid, $where); if ($attribs->{found}) { @@ -280,15 +280,13 @@ sub fv_list_dirs sub fv_get_file_attribute { my ($jobid, $full_name) = @_; - - # default to / - my $path = "'/'"; - my $filename = "''"; - - if ($full_name ne '/') { - $filename = $bweb->dbh_quote(basename($full_name)); - $path = $bweb->dbh_quote(dirname($full_name) . "/"); + + if ($full_name eq '/') { + return {found => 0}; } + + my $filename = $bweb->dbh_quote(basename($full_name)); + my $path = $bweb->dbh_quote(dirname($full_name) . "/"); my $attr = $bweb->dbh_selectrow_hashref(" SELECT 1 AS found, -- 2.39.5