From 4db13a7792a5161987d59fc747e521e7805daac6 Mon Sep 17 00:00:00 2001 From: Felipe <41008398+StrawberryMaster@users.noreply.github.com> Date: Wed, 30 Apr 2025 13:01:29 +0000 Subject: [PATCH] Fix --all-timestamps we were accidentally removing the timestamp prefix from `file_id`, rendering that option useless in 2.3.4. This should again now. This will fix #4 --- lib/wayback_machine_downloader.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/wayback_machine_downloader.rb b/lib/wayback_machine_downloader.rb index 1d99769..0118f7c 100644 --- a/lib/wayback_machine_downloader.rb +++ b/lib/wayback_machine_downloader.rb @@ -538,10 +538,9 @@ class WaybackMachineDownloader file_url = file_remote_info[:file_url].encode(current_encoding) file_id = file_remote_info[:file_id] file_timestamp = file_remote_info[:timestamp] - original_file_id = @all_timestamps ? file_id.split('/', 2)[1] : file_id - file_path_elements = original_file_id.split('/') + file_path_elements = file_id.split('/') - if original_file_id == "" + if file_id == "" dir_path = backup_path file_path = backup_path + 'index.html' elsif file_url[-1] == '/' or not file_path_elements[-1].include? '.'