diff --git a/lib/epubmaker/epubv3.rb b/lib/epubmaker/epubv3.rb index 0636b5ff7..8455f1717 100644 --- a/lib/epubmaker/epubv3.rb +++ b/lib/epubmaker/epubv3.rb @@ -126,7 +126,7 @@ def opf_manifest if @producer.params["coverimage"] @producer.contents.each do |item| - if item.media =~ /\Aimage/ && item.file =~ /#{@producer.params["coverimage"]}\Z/ + if item.media =~ /\Aimage/ && File.basename(item.file) == @producer.params["coverimage"] s << %Q[ \n] item.id = nil break