with empty session we don't need to die here
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 6 Jun 2010 14:54:19 +0000 (16:54 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 6 Jun 2010 14:54:19 +0000 (16:54 +0200)
lib/MojoFacets/Data.pm

index b8d7547..d476867 100644 (file)
@@ -290,7 +290,11 @@ sub _permanent_path {
 
 sub _export_path {
        my $self = shift;
-       my $path = $self->_param_or_session('path') || die "no path";
+       my $path = $self->_param_or_session('path');
+       if ( ! $path ) {
+               warn "no path in param or session";
+               return;
+       }
        my $dir = $self->app->home->rel_dir('public') . "/export/$path";
        mkpath $dir unless -e $dir;
        $dir . '/' . join('.', @_);