loolwsd/LOOLSession.cpp | 5 +++++ 1 file changed, 5 insertions(+) New commits: commit c6743b4d644bce8df95ac1e1f4bb9e0fd28f89db Author: Jan Holesovsky <ke...@collabora.com> Date: Thu Nov 5 12:15:54 2015 +0100
loolwsd: Remove the potential leftover document before attempting to link. Otherwise we create a copy, and at the moment, the copy is not copied back out of the chroot jail; we should bind that to the .uno:Save callback... diff --git a/loolwsd/LOOLSession.cpp b/loolwsd/LOOLSession.cpp index 36b6a92..32b4b9f 100644 --- a/loolwsd/LOOLSession.cpp +++ b/loolwsd/LOOLSession.cpp @@ -627,6 +627,11 @@ void MasterProcessSession::dispatchChild() } + // cleanup potential leftovers from the last time + File aToCleanup(aDstFile); + if (aToCleanup.exists()) + aToCleanup.remove(); + #ifdef __linux Application::instance().logger().information(Util::logPrefix() + "Linking " + aSrcFile.toString() + " to " + aDstFile.toString()); if (link(aSrcFile.toString().c_str(), aDstFile.toString().c_str()) == -1) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits