Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatch of output basename for file and dir #251

Closed
jirib opened this issue Apr 4, 2015 · 1 comment
Closed

Mismatch of output basename for file and dir #251

jirib opened this issue Apr 4, 2015 · 1 comment
Labels
Milestone

Comments

@jirib
Copy link
Contributor

jirib commented Apr 4, 2015

  1. one doc, -o /tmp/foo => /tmp/foo.doc
  2. two docs, -o /tmp/ => /tmp/foo/doc1.doc, /tmp/foo/doc2.doc
--- a/unoconv
+++ b/unoconv
@@ -920,9 +920,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(op.output + os.extsep + outputfmt.extension)

                 outputurl = unohelper.absolutize( self.cwd, unohelper.systemPathToFileUrl(outputfn) )
                 info(1, "Output file: %s" % outputfn)
@dagwieers dagwieers added the bug label Apr 23, 2015
@dagwieers
Copy link
Member

Merged 45fc428

Thanks !

PS A pull-request would have been somewhat easier ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants