Kaydet (Commit) 8bd827c9 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Ignore dangling symlink configuration files

This will be used by the Flatpak build, to offload per-locale data to a Locale
extension (which expects all per-locale files to be in one place, so we need to
add---potentially dangling, if a given locale is not installed---symlinks from
the original places to the location where that Locale extension stores the
actual files).

Change-Id: Id13b8c53fbc9e0763e53fd09c0c059c9e638c13d
Reviewed-on: https://gerrit.libreoffice.org/52381Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 480309b6
...@@ -708,6 +708,10 @@ void Components::parseFiles( ...@@ -708,6 +708,10 @@ void Components::parseFiles(
parseFileLeniently( parseFileLeniently(
parseFile, stat.getFileURL(), layer, nullptr, nullptr, nullptr); parseFile, stat.getFileURL(), layer, nullptr, nullptr, nullptr);
} catch (css::container::NoSuchElementException & e) { } catch (css::container::NoSuchElementException & e) {
if (stat.getFileType() == osl::FileStatus::Link) {
SAL_WARN("configmgr", "dangling link <" << stat.getFileURL() << ">");
continue;
}
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
"stat'ed file does not exist: " + e.Message); "stat'ed file does not exist: " + e.Message);
} }
...@@ -784,6 +788,10 @@ void Components::parseXcdFiles(int layer, OUString const & url) { ...@@ -784,6 +788,10 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
stat.getFileURL(), stat.getFileURL(),
new XcdParser(layer, processedDeps, data_)); new XcdParser(layer, processedDeps, data_));
} catch (css::container::NoSuchElementException & e) { } catch (css::container::NoSuchElementException & e) {
if (stat.getFileType() == osl::FileStatus::Link) {
SAL_WARN("configmgr", "dangling link <" << stat.getFileURL() << ">");
continue;
}
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
"stat'ed file does not exist: " + e.Message); "stat'ed file does not exist: " + e.Message);
} }
......
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