[Libreoffice-commits] online.git: kit/Kit.cpp

Tamas Bunth tamas.bunth at collabora.co.uk
Wed Aug 16 14:18:20 UTC 2017


 kit/Kit.cpp |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b285c5f321ebac5496b40399aede2e6b8c6cb1af
Author: Tamas Bunth <tamas.bunth at collabora.co.uk>
Date:   Wed Aug 16 16:14:59 2017 +0200

    Copy file with linkOrCopy
    
    So that it can create folder in jails when needed.

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 228b87ab..a5a2be25 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -1790,11 +1790,11 @@ void lokit_main(const std::string& childRoot,
             const auto networkFiles = {"/etc/host.conf", "/etc/hosts", "/etc/nsswitch.conf", "/etc/resolv.conf"};
             for (const auto& filename : networkFiles)
             {
-                const auto etcPath = Path(jailPath, filename).toString();
-                const File networkFile(filename);
-                if (networkFile.exists() && !File(etcPath).exists())
+                const auto etcPath = Path(jailPath, filename);
+                const auto etcPathString = etcPath.toString();
+                if (File(filename).exists() && !File(etcPathString).exists() )
                 {
-                    networkFile.copyTo(etcPath);
+                    linkOrCopy( filename, etcPath, LinkOrCopyType::LO );
                 }
             }
 


More information about the Libreoffice-commits mailing list