rel_dir is replaced with rel_file
[MojoFacets.git] / lib / MojoFacets / Profile.pm
index 3f1fdd2..5fd8bc2 100644 (file)
@@ -15,7 +15,7 @@ sub index {
 
        if ( my $profile = $self->param('profile') ) {
 warn "XXX profile $profile\n";
-               my $dir = $self->app->home->rel_dir('public') . "/profile/$profile";
+               my $dir = $self->app->home->rel_file('public') . "/profile/$profile";
                if ( ! -e $dir ) {
                        mkpath $dir unless -d $dir;
                        system "nytprofhtml --file $path$profile --out $dir";
@@ -35,7 +35,7 @@ sub remove {
 
        if ( my $profile = $self->param('profile') ) {
                unlink "/tmp/MojoFacets.profile.$profile";
-               rmtree $self->app->home->rel_dir('public') . "/profile/$profile";
+               rmtree $self->app->home->rel_file('public') . "/profile/$profile";
        }
 
        return $self->redirect_to('/profile');