summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-08-08 18:46:56 +0200
committerMichael Stahl <mstahl@redhat.com>2014-08-08 18:52:27 +0200
commit4d635dcae4d7275d04a17a0efc11b0531d5d0a82 (patch)
tree0ad11bfd757940bec9cc1a755d4fcda4eaf79c6c /vcl
parentea258e380eb87db2eb468ba5354df9f957b7660f (diff)
vcl: don't throw misleading exceptions on every failed access
During the build different instances of gengal will create a temp file called "instdir/share/config/cdefghij.klm", and enumerate the directories in instdir/share/config; it may happen that the enumeration sees the temp file, and it is removed before fetchFileStatus is called, resulting in E_NOENT rc and the exception. The FileIsValidIconTheme() should be able to handle most errors here. (regression from 60954a8a96a66ff11e06b850838f3d16e8e1625f) Change-Id: Id9361a37b8569d01509efcc8cda2bc17e9eabcd8
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/IconThemeScanner.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/app/IconThemeScanner.cxx b/vcl/source/app/IconThemeScanner.cxx
index 4599260222da..8cb58fe58629 100644
--- a/vcl/source/app/IconThemeScanner.cxx
+++ b/vcl/source/app/IconThemeScanner.cxx
@@ -44,7 +44,10 @@ OUString convert_to_absolute_path(const OUString& path)
osl::FileBase::RC rc = resolver.fetchFileStatus(path);
if (rc != osl::FileBase::E_None) {
SAL_WARN("vcl.app", "Could not resolve path '" << path << "' to search for icon themes.");
- throw std::runtime_error("Provided a recursive symlink to a icon theme directory that could not be resolved.");
+ if (rc == osl::FileBase::E_MULTIHOP)
+ {
+ throw std::runtime_error("Provided a recursive symlink to a icon theme directory that could not be resolved.");
+ }
}
return resolver.m_aStatus.getFileURL();
}