summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-08-30 15:25:18 +0100
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2013-08-30 15:29:27 +0100
commit819b72bb03b2be368790d6e603f282ec6ea72ab4 (patch)
tree4dede88df44c06f6935e47d4e1ee3e8c926ebeae /connectivity
parentff050190aa9bc362501bc1ecadfbf2a8cb5ecf70 (diff)
Set path and not url for FIREBIRD_[TMP|LOCK]. (firebird-sdbc)
Otherwise firbird fails to load databases since it can't access a url. Change-Id: I1bebc6fa18c2d1920291dcf5a7300009ede4452a
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/Driver.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx
index 89c9cfd08125..729dc2bb21f4 100644
--- a/connectivity/source/drivers/firebird/Driver.cxx
+++ b/connectivity/source/drivers/firebird/Driver.cxx
@@ -61,14 +61,15 @@ const OUString FirebirdDriver::our_sFirebirdLockVar("FIREBIRD_LOCK");
FirebirdDriver::FirebirdDriver()
: ODriver_BASE(m_aMutex)
{
- OUString sTmpDir;
- ::osl::FileBase::getTempDirURL(sTmpDir);
+ OUString sTmpDirURL, sTmpDirPath;
+ ::osl::FileBase::getTempDirURL(sTmpDirURL);
+ ::osl::FileBase::getSystemPathFromFileURL(sTmpDirURL, sTmpDirPath);
// Overrides firebird's default of /tmp or c:\temp
- osl_setEnvironment(our_sFirebirdTmpVar.pData, sTmpDir.pData);
+ osl_setEnvironment(our_sFirebirdTmpVar.pData, sTmpDirPath.pData);
// Overrides firebird's default of /tmp/firebird or c:\temp\firebird
- sTmpDir += "/firebird";
- osl_setEnvironment(our_sFirebirdLockVar.pData, sTmpDir.pData);
+ sTmpDirPath += "/firebird";
+ osl_setEnvironment(our_sFirebirdLockVar.pData, sTmpDirPath.pData);
}
void FirebirdDriver::disposing()