[Libreoffice-commits] online.git: 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 f7a769ef289f09109253842d6e51d25b1347a3e3
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