Skip to content

Commit

Permalink
Fix mismatch of output basename for file and dir
Browse files Browse the repository at this point in the history
 1. one doc, -o /tmp/foo => /tmp/foo.doc
 2. two docs, -o /tmp/ => /tmp/foo/doc1.doc, /tmp/foo/doc2.doc
  • Loading branch information
jirib authored and dagwieers committed Jul 1, 2015
1 parent bd0f756 commit 81b0ae5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unoconv
Original file line number Diff line number Diff line change
Expand Up @@ -961,9 +961,9 @@ class Convertor:
if not op.output:
outputfn = outputfn + os.extsep + outputfmt.extension
elif len(op.filenames) > 1:
outputfn = op.output + os.extsep + outputfmt.extension
else:
outputfn = realpath(op.output, os.path.basename(outputfn) + os.extsep + outputfmt.extension)
else:
outputfn = realpath(outputfn + os.extsep + outputfmt.extension)

outputurl = unohelper.absolutize( self.cwd, unohelper.systemPathToFileUrl(outputfn) )
info(1, "Output file: %s" % outputfn)
Expand Down

0 comments on commit 81b0ae5

Please sign in to comment.