summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-05-03 23:03:50 +0200
committerMichael Stahl <mstahl@redhat.com>2012-05-03 23:54:24 +0200
commit3ee18325cf8c06c04296173619f4535671e391e9 (patch)
tree665d320288fc94923bb9f77a66dcb9eb90fe3d4d
parent0ae56ccf13ce8ed1047df8eeae379670dcbeaa36 (diff)
respect absolute paths for mozilla profile, fdo#45171, lp#919659
Change-Id: I536238f1f3b05e0a942caa1f65444688d4d36704 (cherry picked from commit fff2d18a08a37c0fa6a370e56591117fc08664d2) Signed-off-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
index be2eb8c84a1c..5e8fecb7deb8 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
@@ -202,13 +202,13 @@ namespace connectivity
}
if (profileName.getLength() != 0 || profilePath.getLength() != 0)
{
-#ifndef MINIMAL_PROFILEDISCOVER
sal_Int32 isRelative = 0;
if (sIsRelative.getLength() != 0)
{
isRelative = sIsRelative.toInt32();
}
+#ifndef MINIMAL_PROFILEDISCOVER
nsCOMPtr<nsILocalFile> rootDir;
rv = NS_NewLocalFile(EmptyString(), PR_TRUE,
getter_AddRefs(rootDir));
@@ -229,11 +229,21 @@ namespace connectivity
rv = rootDir->SetPersistentDescriptor(filePath);
}
if (NS_FAILED(rv)) continue;
+#else
+ rtl::OUString fullProfilePath;
+ if(isRelative)
+ {
+ fullProfilePath = regDir + profilePath;
+ }
+ else
+ {
+ fullProfilePath = profilePath;
+ }
#endif
ProfileStruct* profileItem = new ProfileStruct(product,profileName,
#ifdef MINIMAL_PROFILEDISCOVER
- regDir + profilePath
+ fullProfilePath
#else
rootDir
#endif