Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ensure that files will no extensions will still work.

  • Loading branch information...
commit a106a5115754ad733b9b668165e052101ca255fb 1 parent f3e9fa1
@jashkenas jashkenas authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/docsplit.rb
View
2  lib/docsplit.rb
@@ -62,7 +62,7 @@ def self.extract_pdf(docs, opts={})
[docs].flatten.each do |doc|
ext = File.extname(doc)
basename = File.basename(doc, ext)
- if GM_FORMATS.include?(ext.sub(/^\./, '').downcase.to_sym)
+ if ext.length > 0 && GM_FORMATS.include?(ext.sub(/^\./, '').downcase.to_sym)
`gm convert "#{doc}" "#{out}/#{basename}.pdf"`
else
options = "-jar #{ROOT}/vendor/jodconverter/jodconverter-core-3.0-beta-3.jar -r #{ROOT}/vendor/conf/document-formats.js"

0 comments on commit a106a51

Please sign in to comment.
Something went wrong with that request. Please try again.