diff options
Diffstat (limited to 'usr/src/libpiny/lib')
-rw-r--r-- | usr/src/libpiny/lib/Piny/Repo.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/src/libpiny/lib/Piny/Repo.pm b/usr/src/libpiny/lib/Piny/Repo.pm index 1880ee2..003be93 100644 --- a/usr/src/libpiny/lib/Piny/Repo.pm +++ b/usr/src/libpiny/lib/Piny/Repo.pm @@ -204,10 +204,10 @@ sub rebuild { }; foreach( "info", "logs" ) { - (-e $s->path . "/" . $_) or mkdir( $s->path . "/" . $_ ) and die "Could not mkdir $_ for repo: $!"; + (-e $s->path . "/" . $_) or mkdir( $s->path . "/" . $_ ) or die "Could not mkdir $_ for repo: $!"; }; - chown( 0, 0, $s->path, $s->path . '/config' ) and die "Could not change ownership of git dir!"; + chown( 0, 0, $s->path, $s->path . '/config' ) or die "Could not change ownership of git dir!"; foreach( "branches", "description", "HEAD", "info", "logs", "objects", "packed-refs", "refs" ) { system( "/bin/chown", "-R", $s->owner->name . "." . $s->group->name, $s->path . "/" . $_ ) and die "Could not change ownership of $_ for repo: $!"; @@ -430,7 +430,7 @@ sub create { }; foreach( "info", "logs" ) { - mkdir( $repo->path . "/" . $_ ) and die "Could not mkdir $_ for repo: $!"; + ( -e $repo->path . "/" . $_ ) or mkdir( $repo->path . "/" . $_ ) or die "Could not mkdir $_ for repo: $!"; }; @@ -438,7 +438,7 @@ sub create { system( "/bin/chown", "-R", $user->name . "." . $group->name, $repo->path . "/" . $_ ) and die "Could not change ownership of $_ for repo: $!"; }; - chown( 0, 0, $repo->path, $repo->path . '/config' ) and die "Could not change ownership of git dir!"; + chown( 0, 0, $repo->path, $repo->path . '/config' ) or die "Could not change ownership of git dir!"; system( "/bin/chown", "-R", $ikiuser->name . "." . $ikiuser->name, $repo->path . "/hooks" ) and die "Could not change ownership of git hooks!"; |