Only try to convert outdir to system path when it's not empty
Avoids a warning on startup of a debug build: > instdir/program/soffice warn:legacy.osl:1528:2140:sal/osl/w32/file_url.cxx:849: osl_getAbsoluteFileURL called with empty base URL and/or invalid relative URL Change-Id: Ic456f08011d099a95894259f31800f12318af223 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140230 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
parent
8c285077e9
commit
321a1b5034
1 changed files with 4 additions and 8 deletions
|
@ -1249,7 +1249,6 @@ static void AddConversionsToDispatchList(
|
|||
nType = DispatchWatcher::REQUEST_CAT;
|
||||
else
|
||||
nType = DispatchWatcher::REQUEST_CONVERSION;
|
||||
aParam = rParam;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1262,8 +1261,6 @@ static void AddConversionsToDispatchList(
|
|||
}
|
||||
}
|
||||
|
||||
OUString aOutDir( rParamOut.trim() );
|
||||
std::u16string_view aImgOut = o3tl::trim(rImgOut);
|
||||
OUString aPWD;
|
||||
if (cwdUrl)
|
||||
{
|
||||
|
@ -1274,11 +1271,10 @@ static void AddConversionsToDispatchList(
|
|||
utl::Bootstrap::getProcessWorkingDir( aPWD );
|
||||
}
|
||||
|
||||
if( !::osl::FileBase::getAbsoluteFileURL( aPWD, rParamOut, aOutDir ) )
|
||||
::osl::FileBase::getSystemPathFromFileURL( aOutDir, aOutDir );
|
||||
|
||||
if( !rParamOut.trim().isEmpty() )
|
||||
if (OUString aOutDir(rParamOut.trim()); !aOutDir.isEmpty())
|
||||
{
|
||||
if (osl::FileBase::getAbsoluteFileURL(aPWD, rParamOut, aOutDir) == osl::FileBase::E_None)
|
||||
osl::FileBase::getSystemPathFromFileURL(aOutDir, aOutDir);
|
||||
aParam += ";" + aOutDir;
|
||||
}
|
||||
else
|
||||
|
@ -1288,7 +1284,7 @@ static void AddConversionsToDispatchList(
|
|||
}
|
||||
|
||||
if( !rImgOut.empty() )
|
||||
aParam += OUString::Concat("|") + aImgOut;
|
||||
aParam += OUString::Concat("|") + o3tl::trim(rImgOut);
|
||||
|
||||
for (auto const& request : rRequestList)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue