[Libreoffice-commits] core.git: configmgr/source

Stephan Bergmann sbergman at redhat.com
Wed Apr 4 15:22:49 UTC 2018


 configmgr/source/components.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 8bd827c976037381be963d4ef99bfb9a2d720889
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 4 15:44:40 2018 +0200

    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 at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 3f99191bb2d4..e296f8dfa8de 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -708,6 +708,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);
                 }
@@ -784,6 +788,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);
                 }


More information about the Libreoffice-commits mailing list