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

New commits:
commit 5471e967b914693ea8dc24b74a6989793ea65083
Author:     Ashod Nakashian <ashod.nakash...@collabora.co.uk>
AuthorDate: Fri Apr 10 11:02:02 2020 -0400
Commit:     Ashod Nakashian <ashnak...@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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Ashod Nakashian <ashnak...@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:
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to