Home Bug Reports

IceGrid: using Windows network drives

mpugachmpugach Member Michael PugachOrganization: StrategyRunnerProject: StrategyRunner
Ice: Ice-3.2.1 for C++
OS: Windows XP
Compiler: VS 2005

I'm trying to install IceGridNode/Registry as a Windows Service putting data directory on a Windows network drive. When Windows starts a service it does not use network drive letters defined for a Windows account. The only way to define Grid’s data directory is to use shared resource name (\\server name\share name\directory name). Currently Ice 3.2.1 for C++ does not support that. In order to make it work I did two fixes. The second fix is intended for IceBox activated by Grid.

1. File: Ice-3.2.1/src/IcePatch2/Util.cpp
Function: string IcePatch2::simplify(const string& path)
Line: 280

Change

#ifdef _WIN32
for(pos = 0; pos < result.size(); ++pos)
{
if(result[pos] == '\\')
{
result[pos] = '/';
}
}
#endif

to

#ifdef _WIN32
// In case of network drive skip first two backslashes
if(result.find("\\\\") != string::npos)
{
pos = 2;
}
else
{
pos = 0;
}

for(; pos < result.size(); ++pos)
{
if(result[pos] == '\\')
{
result[pos] = '/';
}
}
#endif

2. File: Ice-3.2.1/src/IceUtil/options.cpp
Function: IceUtil::Options::StringVector IceUtil::Options::split(const string& line)
Line: 323

Change

case '"':
case '\\':
case '\n':
{
arg.push_back(c);
break;
}

to

case '"':
case '\\':
case '\n':
{
arg.push_back(c);
#ifdef WIN32
// Add a second backslash for network drive in Windows
if (c == '\\')
{
arg.push_back(c);
}
#endif
break;
}

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Michael,

    Thanks for the bug report, we'll look into this.

    Cheers,
    Benoit.
Sign In or Register to comment.