diff --git a/lib/libreconv.rb b/lib/libreconv.rb index da81a97..90c9c7e 100644 --- a/lib/libreconv.rb +++ b/lib/libreconv.rb @@ -113,7 +113,7 @@ def escaped_source_path # @return [String] def target_filename - File.basename(escaped_source_path, '.*') + '.' + File.basename(@convert_to, ':*') + File.basename(escaped_source_path, '.*') + '.' + @convert_to.split(':').first end # @raise [IOError] If soffice headless command line tool not found. diff --git a/spec/libreconv/converter_convert_url_spec.rb b/spec/libreconv/converter_convert_url_spec.rb index 48b1587..2da9690 100644 --- a/spec/libreconv/converter_convert_url_spec.rb +++ b/spec/libreconv/converter_convert_url_spec.rb @@ -23,7 +23,7 @@ end def stub_sample_url - url = 'http://file-examples.com/wp-content/uploads/2017/02/file-sample_100kB.doc' + url = 'http://file-examples.com/wp-content/storage/2017/02/file-sample_100kB.doc' redirection = url.sub(/^http:/i, 'https:') + '?a=a&b=b#c' stub_request(:head, url)