Archived
This forum has been archived. Please start a new discussion on GitHub.
IcePatch2 modify
I have config IceGrid as windows service with icepatch2.
It is throws exception when we use icegrid patchs application,
after check code,I found error cause when invoke OS::mkdir(path) and
path is root,so I add a condition . It's works fine
icepatch2 util.cpp
void
IcePatch2::createDirectoryRecursive(const string& pa)
{
const string path = simplify(pa);
string dir = getDirname(path);
if(!dir.empty())
{
createDirectoryRecursive(dir);
}
if(!isRoot(path+"/")) //add this condision:o
{
if(OS::mkdir(path, 0777) == -1)
{
if(errno != EEXIST)
{
throw "cannot create directory `" + path + "':\n" + lastError();
}
}
}
}
It is throws exception when we use icegrid patchs application,
after check code,I found error cause when invoke OS::mkdir(path) and
path is root,so I add a condition . It's works fine
icepatch2 util.cpp
void
IcePatch2::createDirectoryRecursive(const string& pa)
{
const string path = simplify(pa);
string dir = getDirname(path);
if(!dir.empty())
{
createDirectoryRecursive(dir);
}
if(!isRoot(path+"/")) //add this condision:o
{
if(OS::mkdir(path, 0777) == -1)
{
if(errno != EEXIST)
{
throw "cannot create directory `" + path + "':\n" + lastError();
}
}
}
}
0
Comments
-
Thanks for the bug report.
What IcePatch configuration are you using? You are trying to use the root directory of a drive as your IcePatch repository?
Can you please also fill out your signature information as described in the link contained in my signature?0 -
icegrid
icegridnode inclue icepatch client function,
when icegridnode run as windows services(current work dir diff from run as application) so IceGrid.Node.Data should set ad "IceGrid.Node.Data=D:\DemoGrid\db\node"
(original is db/node).
then createDirectoryRecursive(..) will Recursive until path="d:"
OS::mkdir("d:" , 0777) thows exception
IceGrid.InstanceName=DemoGrid
#
# The IceGrid locator proxy.
#
Ice.Default.Locator=DemoGrid/Locator:default -p 12000
#
# IceGrid registry configuration.
#
IceGrid.Registry.Client.Endpoints=default -p 12000
IceGrid.Registry.Server.Endpoints=default
IceGrid.Registry.Internal.Endpoints=default
IceGrid.Registry.Admin.Endpoints=default
IceGrid.Registry.Data=D:\DemoGrid\db\registry
IceGrid.Registry.PermissionsVerifier=DemoGrid/NullPermissionsVerifier
IceGrid.Registry.AdminPermissionsVerifier=DemoGrid/NullPermissionsVerifier
#
# IceGrid node configuration.
#
IceGrid.Node.Name=localhost
IceGrid.Node.Endpoints=default
IceGrid.Node.Data=D:\DemoGrid\db\node
IceGrid.Node.CollocateRegistry=1
#IceGrid.Node.Output=db
#IceGrid.Node.RedirectErrToOut=1
#
# Trace properties.
#
IceGrid.Node.Trace.Activator=1
IceGrid.Node.Trace.Patch=1
#IceGrid.Node.Trace.Adapter=2
#IceGrid.Node.Trace.Server=30 -
I have fill out mysignature information
I have fill out mysignature information0