Skip to content

Commit a106a51

Browse files
committed
ensure that files will no extensions will still work.
1 parent f3e9fa1 commit a106a51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/docsplit.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def self.extract_pdf(docs, opts={})
6262
[docs].flatten.each do |doc|
6363
ext = File.extname(doc)
6464
basename = File.basename(doc, ext)
65-
if GM_FORMATS.include?(ext.sub(/^\./, '').downcase.to_sym)
65+
if ext.length > 0 && GM_FORMATS.include?(ext.sub(/^\./, '').downcase.to_sym)
6666
`gm convert "#{doc}" "#{out}/#{basename}.pdf"`
6767
else
6868
options = "-jar #{ROOT}/vendor/jodconverter/jodconverter-core-3.0-beta-3.jar -r #{ROOT}/vendor/conf/document-formats.js"

0 commit comments

Comments
 (0)