diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-04-04 15:44:40 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-04-12 10:54:35 +0200 |
commit | d0e5163d9f587a7fc4a6df5d3661f3baafa8c314 (patch) | |
tree | 20433fe169bfbde97e2b64b8ae66af8270f6d226 /configmgr | |
parent | 869d3c31f62220b4ebf0a3870ed0793a4f8bebf8 (diff) |
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/52381
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 8bd827c976037381be963d4ef99bfb9a2d720889)
Reviewed-on: https://gerrit.libreoffice.org/52397
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit d5d9e64cd65ca0f9fbd07cea27bd7b17dffd8c76)
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/components.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index 5354763b0c95..dc4374d60ec6 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -705,6 +705,10 @@ void Components::parseFiles( parseFileLeniently( parseFile, stat.getFileURL(), layer, nullptr, nullptr, nullptr); } catch (css::container::NoSuchElementException & e) { + if (stat.getFileType() == osl::FileStatus::Link) { + SAL_WARN("configmgr", "dangling link <" << stat.getFileURL() << ">"); + continue; + } throw css::uno::RuntimeException( "stat'ed file does not exist: " + e.Message); } @@ -781,6 +785,10 @@ void Components::parseXcdFiles(int layer, OUString const & url) { stat.getFileURL(), new XcdParser(layer, processedDeps, data_)); } catch (css::container::NoSuchElementException & e) { + if (stat.getFileType() == osl::FileStatus::Link) { + SAL_WARN("configmgr", "dangling link <" << stat.getFileURL() << ">"); + continue; + } throw css::uno::RuntimeException( "stat'ed file does not exist: " + e.Message); } |