From 6967a3737bc7cbfb6624afc201ad706ee48bda71 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 24 Jun 2010 16:52:19 +0200 Subject: [PATCH] strip traling slash for dirs in _export_path --- lib/MojoFacets/Data.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/MojoFacets/Data.pm b/lib/MojoFacets/Data.pm index 3681e0f..3af006c 100644 --- a/lib/MojoFacets/Data.pm +++ b/lib/MojoFacets/Data.pm @@ -343,7 +343,9 @@ sub _export_path { my $dir = $self->app->home->rel_dir('public') . "/export/$path"; mkpath $dir unless -e $dir; my $name = join('.', map { __unac($_) } @_ ); - $dir . '/' . $name; + my $full = $dir . '/' . $name; + $full =~ s/\/+$// if -d $full; # strip trailing slash for dirs + return $full; } sub columns { -- 2.20.1