From 0a45185711ce0e1b82b620b09060260005581785 Mon Sep 17 00:00:00 2001
From: Magali Ruffier <mr6@ebi.ac.uk>
Date: Wed, 7 Jan 2015 15:55:55 +0000
Subject: [PATCH] ENSCORESW-764: if uri is home page, create a name

---
 misc-scripts/xref_mapping/XrefParser/FetchFiles.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/misc-scripts/xref_mapping/XrefParser/FetchFiles.pm b/misc-scripts/xref_mapping/XrefParser/FetchFiles.pm
index 2d40810a17..0920bf95b2 100644
--- a/misc-scripts/xref_mapping/XrefParser/FetchFiles.pm
+++ b/misc-scripts/xref_mapping/XrefParser/FetchFiles.pm
@@ -203,7 +203,10 @@ sub fetch_files {
     } elsif ( $uri->scheme() eq 'http' ) {
       # Deal with HTTP files.
 
-      my $file_path = catfile( $dest_dir, basename( $uri->path() ) );
+      my $filename = basename ($uri->path() );
+      if ($uri->path eq '') { $filename = "index.html"; }
+
+      my $file_path = catfile( $dest_dir, $filename );
 
       if ( $deletedownloaded && -e $file_path ) {
         if ($verbose) {
-- 
GitLab