summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-05-03 23:03:50 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-05-03 23:05:33 +0200
commitfff2d18a08a37c0fa6a370e56591117fc08664d2 (patch)
tree3a944ed445cc9cdbb273c4c50f99d398096edee9
parentc77110b486cab2e1d003013c26ec327dfa4d6959 (diff)
respect absolute paths for mozilla profile, fdo#45171, lp#919659
Change-Id: I536238f1f3b05e0a942caa1f65444688d4d36704
-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 959896a0c426..9a4b21158d88 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
@@ -203,13 +203,13 @@ namespace connectivity
}
if (!(profileName.isEmpty() && profilePath.isEmpty()))
{
-#ifndef MINIMAL_PROFILEDISCOVER
sal_Int32 isRelative = 0;
if (!sIsRelative.isEmpty())
{
isRelative = sIsRelative.toInt32();
}
+#ifndef MINIMAL_PROFILEDISCOVER
nsCOMPtr<nsILocalFile> rootDir;
rv = NS_NewLocalFile(EmptyString(), PR_TRUE,
getter_AddRefs(rootDir));
@@ -230,11 +230,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