diff options
-rw-r--r-- | desktop/source/app/dispatchwatcher.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx index 3a8b2d9961a0..872d98333982 100644 --- a/desktop/source/app/dispatchwatcher.cxx +++ b/desktop/source/app/dispatchwatcher.cxx @@ -575,10 +575,13 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest else aFilterOut = aParam.copy( nPathIndex+1 ); - INetURLObject aOutFilename( aObj ); - aOutFilename.SetExtension( aFilterExt ); FileBase::getFileURLFromSystemPath( aFilterOut, aFilterOut ); - OUString aOutFile = aFilterOut + "/" + aOutFilename.getName(); + INetURLObject aOutFilename(aFilterOut); + aOutFilename.Append(aObj.getName(INetURLObject::LAST_SEGMENT, true, + INetURLObject::DecodeMechanism::NONE)); + aOutFilename.SetExtension(aFilterExt); + OUString aOutFile + = aOutFilename.GetMainURL(INetURLObject::DecodeMechanism::NONE); std::unique_ptr<utl::TempFile> fileForCat; if( aDispatchRequest.aRequestType == REQUEST_CAT ) |