diff options
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index 86abc45..0d2cb64 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -318,6 +318,7 @@ sub destroy { sub destroy_git { my ( $s ) = @_; system( "rm", "-rf", $s->path ); + system( "delgroup", $s->group->name ); }; sub destroy_ikiwiki { @@ -355,7 +356,6 @@ sub destroy_ikiwiki { system( "deluser", "--remove-home", "iki-" . $s->shortname ); system( "delgroup", "iki-" . $s->shortname ); - system( "delgroup", $s->group->name ); }; @@ -398,7 +398,7 @@ sub create { my ( $class, $name, $description, $source ) = @_; if ( not defined $source) { - $source = Piny::Environment->config->piny_template; + $source = Piny::Config->new->piny_template; }; my $user = Piny::Environment->instance->user; @@ -424,7 +424,8 @@ sub create { $repo->description( $description ); - $repo->rebuild; + $repo->rebuild_git; + $repo->rebuild_ikiwiki; return $repo; }; |