Kaydet (Commit) 4d635dca authored tarafından Michael Stahl's avatar Michael Stahl

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 60954a8a)

Change-Id: Id9361a37b8569d01509efcc8cda2bc17e9eabcd8
üst ea258e38
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment