Skip to content

Commit f38756d

Browse files
Correction for downloaded data folder
if you downloaded content from example.org/*, it would be listed in a folder titled * instead of the sitename. See #6 (and thanks to elidickinson for pointing it out!)
1 parent 9452411 commit f38756d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/wayback_machine_downloader.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,12 @@ def initialize params
154154
end
155155

156156
def backup_name
157-
if @base_url.include? '//'
158-
@base_url.split('/')[2]
157+
url_to_process = @base_url.end_with?('/*') ? @base_url.chomp('/*') : @base_url
158+
159+
if url_to_process.include? '//'
160+
url_to_process.split('/')[2]
159161
else
160-
@base_url
162+
url_to_process
161163
end
162164
end
163165

0 commit comments

Comments
 (0)