diff --git a/lib/docx/document.rb b/lib/docx/document.rb index bd79c8f..ac4396b 100755 --- a/lib/docx/document.rb +++ b/lib/docx/document.rb @@ -30,8 +30,7 @@ def initialize(path_or_io, options = {}) @zip = Zip::File.open_buffer(path_or_io) end - document = @zip.find_entry('word/document.xml') - document ||= @zip.find_entry('word/document2.xml') + document = @zip.glob('word/document*.xml').first raise Errno::ENOENT if document.nil? @document_xml = document.get_input_stream.read