Skip to content

Commit ac26b19

Browse files
committed
better check for previously extracted source files
When extracting source files for the API server, we always fix the extracted path have a single directory with the same name as the release. Since we are also using the directory as a staging area, we end up with the release name doubled. When checking for a previously extracted tarball, use the full path of the directory, since old versions of the software or incomplete extractions may have left the parent directory in place but not have the full proper new paths.
1 parent 1a61458 commit ac26b19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/MetaCPAN/Server/Model/Source.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ sub path {
8888
return $source
8989
if -e $source;
9090
return undef
91-
if -e $source_base; # previously extracted, but file does not exist
91+
if -e $source_base->child($distvname); # previously extracted, but file does not exist
9292

9393
my $release_data
9494
= $self->es_query->release->by_author_and_name( $pauseid, $distvname )

0 commit comments

Comments
 (0)