[Libreoffice-bugs] [Bug 123474] New: Cannot --convert-to using a drive root as --outdir on Windows

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Feb 15 04:21:53 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=123474

            Bug ID: 123474
           Summary: Cannot --convert-to using a drive root as --outdir on
                    Windows
           Product: LibreOffice
           Version: 6.2.0.3 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: mikekaganski at hotmail.com

See https://ask.libreoffice.org/en/question/183177

Command line like

> path\to\soffice --convert-to pdf --outdir D:\ D:\dir\doc.odt

fails, and emits "Error: Please verify input parameters...
(SfxBaseModel::impl_store <file:///D://doc.pdf> failed: 0x31c(Error Area:Io
Class:NotExists Code:28))" in debug builds.

The problem is that IsValidFilePath(D:\\doc.pdf) returns false because of the
two consequent backslashes after the drive letter (see check if
dwCandidatPathType is PATHTYPE_ABSOLUTE_LOCAL). I don't know if it's correct
(it looks like Windows command prompt has no problems with d:\\file.ext
itself); however, to solve the problem, we can ensure that no extra slash is
added when target directory already contains trailing slash (which is
inevitable when it's a drive root, where omitting the trailing slash changes
the meaning of the path to "current directory on that drive"). The place to
change is at DispatchWatcher::executeDispatchRequests(), where currently URI is
built like "aFilterOut + "/" + aOutFilename.getName()".

Tested with Version: 6.2.0.3 (x64)
Build ID: 98c6a8a1c6c7b144ce3cc729e34964b47ce25d62
CPU threads: 12; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190215/b512caa3/attachment-0001.html>


More information about the Libreoffice-bugs mailing list