From 853d0015773d640d3f2915c1c50e230a1c7b9ce5 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Fri, 15 Oct 2010 20:26:46 -0700 Subject: Only attempt to mkdir if they don't already exist. --- usr/src/libpiny/lib/Piny/Repo.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/src/libpiny/lib/Piny') diff --git a/usr/src/libpiny/lib/Piny/Repo.pm b/usr/src/libpiny/lib/Piny/Repo.pm index facc812..1880ee2 100644 --- a/usr/src/libpiny/lib/Piny/Repo.pm +++ b/usr/src/libpiny/lib/Piny/Repo.pm @@ -204,7 +204,7 @@ sub rebuild { }; foreach( "info", "logs" ) { - mkdir( $s->path . "/" . $_ ) and die "Could not mkdir $_ for repo: $!"; + (-e $s->path . "/" . $_) or mkdir( $s->path . "/" . $_ ) and die "Could not mkdir $_ for repo: $!"; }; chown( 0, 0, $s->path, $s->path . '/config' ) and die "Could not change ownership of git dir!"; -- cgit v1.2.3