Permalink
Browse files

ensure that files will no extensions will still work.

  • Loading branch information...
1 parent f3e9fa1 commit a106a5115754ad733b9b668165e052101ca255fb @jashkenas jashkenas committed May 16, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/docsplit.rb
View
@@ -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.