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

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 24 13:40:48 UTC 2020


 kit/Kit.cpp |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 5471e967b914693ea8dc24b74a6989793ea65083
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Fri Apr 10 11:02:02 2020 -0400
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Fri Apr 24 15:40:30 2020 +0200

    wsd: killpoco - reduce Poco usage where unnecessary
    
    Poco's File::linkTo was added in version 1.8.1 and
    we still support older versions. Also, symlink(2) is
    far more transparent and simpler here.
    
    Change-Id: If537cc77cd1388f3c0e2a6b16b1edcf46a60e357
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92102
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index acb8d6eec..eefffb98b 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -295,7 +295,12 @@ namespace
                 target[written] = '\0';
 
                 File(newPath.parent()).createDirectories();
-                File(target).linkTo(newPath.toString(), Poco::File::LinkType::LINK_SYMBOLIC);
+                if (symlink(target, newPath.toString().c_str()) == -1)
+                {
+                    LOG_SYS("symlink(\"" << target << "\", \"" << newPath.toString()
+                                         << "\") failed");
+                    return 1;
+                }
             }
             break;
         case FTW_DNR:


More information about the Libreoffice-commits mailing list