summaryrefslogtreecommitdiff
path: root/usr/src/libpiny/lib/Piny/Repo.pm
diff options
context:
space:
mode:
authorJulian Blake Kongslie <jblake@omgwallhack.org>2010-10-15 20:49:17 -0700
committerJulian Blake Kongslie <jblake@omgwallhack.org>2010-10-15 20:49:17 -0700
commitec127b2557ab185874f11e1f348f3918395fba46 (patch)
tree845e77fa1194281382b7d80e97318ea2bb6f5a8f /usr/src/libpiny/lib/Piny/Repo.pm
parentf7a414f001e46707afa920be231eaee486a76138 (diff)
downloadpiny-code-ec127b2557ab185874f11e1f348f3918395fba46.tar.gz
piny-code-ec127b2557ab185874f11e1f348f3918395fba46.zip
Fix some error handling.
Diffstat (limited to 'usr/src/libpiny/lib/Piny/Repo.pm')
-rw-r--r--usr/src/libpiny/lib/Piny/Repo.pm8
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!";