<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Cannot --convert-to using a drive root as --outdir on Windows"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=123474">123474</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Cannot --convert-to using a drive root as --outdir on Windows
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>6.2.0.3 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mikekaganski@hotmail.com
</td>
</tr></table>
<p>
<div>
<pre>See <a href="https://ask.libreoffice.org/en/question/183177">https://ask.libreoffice.org/en/question/183177</a>
Command line like
<span class="quote">> path\to\soffice --convert-to pdf --outdir D:\ D:\dir\doc.odt</span >
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>