The protocol was already checked above
Change-Id: If2ca73f043308736a4bfc3325d51aa271b07abe1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180200 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@@ -895,13 +895,8 @@ void SvtFileDialog::OpenHdl_Impl(void const * pVoid)
|
|||||||
OUString sError(FpsResId(RID_FILEOPEN_NOTEXISTENTFILE));
|
OUString sError(FpsResId(RID_FILEOPEN_NOTEXISTENTFILE));
|
||||||
|
|
||||||
OUString sInvalidFile( aFileObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) );
|
OUString sInvalidFile( aFileObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) );
|
||||||
if ( INetProtocol::File == aFileObj.GetProtocol() )
|
// transform the URL into system notation
|
||||||
{ // if it's a file URL, transform the URL into system notation
|
osl_getSystemPathFromFileURL(sInvalidFile.pData, &sInvalidFile.pData);
|
||||||
OUString sURL( sInvalidFile );
|
|
||||||
OUString sSystem;
|
|
||||||
osl_getSystemPathFromFileURL( sURL.pData, &sSystem.pData );
|
|
||||||
sInvalidFile = sSystem;
|
|
||||||
}
|
|
||||||
sError = sError.replaceFirst( "$name$", sInvalidFile );
|
sError = sError.replaceFirst( "$name$", sInvalidFile );
|
||||||
|
|
||||||
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(m_xDialog.get(),
|
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(m_xDialog.get(),
|
||||||
|
Reference in New Issue
Block a user