#101138# using memory registry if no url given && create flag set
This commit is contained in:
parent
9187f4da5b
commit
feef1b3466
1 changed files with 23 additions and 10 deletions
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: regimpl.cxx,v $
|
||||
*
|
||||
* $Revision: 1.12 $
|
||||
* $Revision: 1.13 $
|
||||
*
|
||||
* last change: $Author: jsc $ $Date: 2002-06-18 17:28:00 $
|
||||
* last change: $Author: dbo $ $Date: 2002-07-30 12:00:48 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -485,7 +485,17 @@ RegError ORegistry::initRegistry(const OUString& regName, RegAccessMode accessMo
|
|||
m_readOnly = sal_True;
|
||||
}
|
||||
|
||||
if (errCode = rRegFile.create(regName, sAccessMode, REG_PAGESIZE))
|
||||
if (0 == regName.getLength() &&
|
||||
store_AccessCreate == sAccessMode)
|
||||
{
|
||||
errCode = rRegFile.createInMemory();
|
||||
}
|
||||
else
|
||||
{
|
||||
errCode = rRegFile.create(regName, sAccessMode, REG_PAGESIZE);
|
||||
}
|
||||
|
||||
if (errCode)
|
||||
{
|
||||
switch (errCode)
|
||||
{
|
||||
|
@ -580,6 +590,8 @@ RegError ORegistry::destroyRegistry(const OUString& regName)
|
|||
m_file.close();
|
||||
m_isOpen = sal_False;
|
||||
|
||||
if (m_name.getLength())
|
||||
{
|
||||
OUString systemName;
|
||||
if ( FileBase::getSystemPathFromFileURL(m_name, systemName) != FileBase::E_None )
|
||||
systemName = m_name;
|
||||
|
@ -589,6 +601,7 @@ RegError ORegistry::destroyRegistry(const OUString& regName)
|
|||
{
|
||||
return REG_DESTROY_REGISTRY_FAILED;
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
return REG_REGISTRY_NOT_EXISTS;
|
||||
|
|
Loading…
Reference in a new issue