[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - cui/source
Ilhan Yesil (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 4 14:55:15 UTC 2019
cui/source/options/certpath.cxx | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
New commits:
commit e3b95b4a2efc3641236f3cfb3a1f5aaf5843045e
Author: Ilhan Yesil <ilhanyesil at gmx.de>
AuthorDate: Wed May 29 12:02:47 2019 +0200
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Thu Jul 4 16:54:39 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.Behrens at cib.de>
(cherry picked from commit 6be961a7b6b5594b65f651522ef19f38bb9579aa)
Reviewed-on: https://gerrit.libreoffice.org/75087
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
Tested-by: Michael Weghorn <m.weghorn at posteo.de>
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index 59d0d8834b0c..57f34df44a15 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -94,7 +94,23 @@ CertPathDialog::CertPathDialog(vcl::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 &e)
{
More information about the Libreoffice-commits
mailing list