[Libreoffice-commits] online.git: Branch 'distro/collabora/milestone-2' - loolwsd/LOOLSession.cpp

Tor Lillqvist tml at collabora.com
Wed Jun 17 06:55:33 PDT 2015


 loolwsd/LOOLSession.cpp |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 9aef49e1ebe6326d32f1596fc509f3fd17543367
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Jun 17 16:52:54 2015 +0300

    Avoid assertion when the --lotemplate parameter ends with a slash

diff --git a/loolwsd/LOOLSession.cpp b/loolwsd/LOOLSession.cpp
index 2b2d9bb..a485482 100644
--- a/loolwsd/LOOLSession.cpp
+++ b/loolwsd/LOOLSession.cpp
@@ -378,6 +378,8 @@ namespace
     void linkOrCopy(const std::string& source, const Path& destination)
     {
         *sourceForLinkOrCopy = source;
+        if (sourceForLinkOrCopy->back() == '/')
+            sourceForLinkOrCopy->pop_back();
         *destinationForLinkOrCopy = destination;
         if (nftw(source.c_str(), linkOrCopyFunction, 10, FTW_DEPTH) == -1)
             Application::instance().logger().error(Util::logPrefix() +


More information about the Libreoffice-commits mailing list