135360
From 423505af348586c46792d2d89c05b8cb9e021928 Mon Sep 17 00:00:00 2001
135360
From: Jan Holesovsky <kendy@collabora.com>
135360
Date: Tue, 7 Jul 2015 08:40:28 +0200
135360
Subject: [PATCH 067/398] LOK: Corner case with working dir as '/'.
135360
135360
Change-Id: I3965966f0d3fe65389e8834d67452ac56f9df2d6
135360
(cherry picked from commit c4e74d50901eeaf979be4707815c1d3490b543ea)
135360
---
135360
 desktop/source/lib/init.cxx | 4 +++-
135360
 1 file changed, 3 insertions(+), 1 deletion(-)
135360
135360
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
135360
index 63fe90b585b2..aa8e27c7f48f 100644
135360
--- a/desktop/source/lib/init.cxx
135360
+++ b/desktop/source/lib/init.cxx
135360
@@ -172,9 +172,11 @@ static OUString getAbsoluteURL(const char* pURL)
135360
     // convert relative paths to absolute ones
135360
     OUString aWorkingDir;
135360
     osl_getProcessWorkingDir(&aWorkingDir.pData);
135360
+    if (!aWorkingDir.endsWith("/"))
135360
+        aWorkingDir += "/";
135360
 
135360
     try {
135360
-        return rtl::Uri::convertRelToAbs(aWorkingDir + "/", aURL);
135360
+        return rtl::Uri::convertRelToAbs(aWorkingDir, aURL);
135360
     }
135360
     catch (const rtl::MalformedUriException &)
135360
     {
135360
-- 
135360
2.12.0
135360