cui/source/options/certpath.cxx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
New commits: commit 6be961a7b6b5594b65f651522ef19f38bb9579aa Author: Ilhan Yesil <ilhanye...@gmx.de> AuthorDate: Wed May 29 12:02:47 2019 +0200 Commit: Katarina Behrens <katarina.behr...@cib.de> CommitDate: Mon Jul 1 21:06:10 2019 +0200 tdf#125552 Don't show deleted certificate folder in Certificate Path dialog Added a check to ensure that certificate folder exists. Change-Id: I351a58bbc606ac48eb9bdc85aaf0dbf8533a3d10 Reviewed-on: https://gerrit.libreoffice.org/73149 Tested-by: Jenkins Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx index 9e3406d07016..9bd43b850e6f 100644 --- a/cui/source/options/certpath.cxx +++ b/cui/source/options/certpath.cxx @@ -90,7 +90,23 @@ CertPathDialog::CertPathDialog(weld::Window* pParent) officecfg::Office::Common::Security::Scripting::CertDir::get().get_value_or(OUString()); if (!sUserSetCertPath.isEmpty()) - AddCertPath(m_sManual, sUserSetCertPath); + { + // check existence + ::osl::DirectoryItem aUserPathItem; + OUString sUserSetCertURLPath; + osl::FileBase::getFileURLFromSystemPath(sUserSetCertPath, sUserSetCertURLPath); + ::osl::FileBase::RC result = ::osl::DirectoryItem::get( sUserSetCertURLPath, aUserPathItem ); + if ( result == ::osl::FileBase::E_None ) + { + ::osl::FileStatus aStatus( osl_FileStatus_Mask_Validate ); + result = aUserPathItem.getFileStatus( aStatus ); + if ( result == ::osl::FileBase::E_None ) + { + // the cert path exists + AddCertPath(m_sManual, sUserSetCertPath); + } + } + } } catch (const uno::Exception &) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits