comparison extra/svn/SoundSoftware.pm @ 10:2c10dc5f122d yuya

* Avoid failure for root of repo tree (no $repo)
author Chris Cannam
date Wed, 25 Aug 2010 12:07:48 +0100
parents 0c83d98252d9
children 8100616a9904
comparison
equal deleted inserted replaced
8:0c83d98252d9 10:2c10dc5f122d
336 my $dbh = shift; 336 my $dbh = shift;
337 my $r = shift; 337 my $r = shift;
338 338
339 my $location = $r->location; 339 my $location = $r->location;
340 my ($repo) = $r->uri =~ m{$location/*([^/]+)}; 340 my ($repo) = $r->uri =~ m{$location/*([^/]+)};
341
342 return $repo if (!$repo);
343
341 $repo =~ s/[^a-zA-Z0-9\._-]//g; 344 $repo =~ s/[^a-zA-Z0-9\._-]//g;
342 345
343 # The original Redmine.pm returns the string just calculated as 346 # The original Redmine.pm returns the string just calculated as
344 # the project identifier. That won't do for us -- we may have 347 # the project identifier. That won't do for us -- we may have
345 # (and in fact already do have, in our test instance) projects 348 # (and in fact already do have, in our test instance) projects