8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 18:03:04 +01:00

Hope the last fix of nbackup host case insensitive cutting. Sorry.

This commit is contained in:
roman-simakov 2013-12-06 15:58:47 +00:00
parent 2c8a258ae5
commit 366a58e3a7

View File

@ -275,10 +275,12 @@ public:
// Recognition of local prefix allows to work with
// database using TCP/IP loopback while reading file locally.
// RS: Maybe check if host is loopback via OS functions is more correct
PathName db(_database), host;
if (ISC_extract_host(db, host, false) == ISC_PROTOCOL_TCPIP)
PathName db(_database), host_port;
if (ISC_extract_host(db, host_port, false) == ISC_PROTOCOL_TCPIP)
{
if (!host.substr(0, sizeof(localhost) -1).equalsNoCase(localhost))
const PathName host = host_port.substr(0, sizeof(localhost) - 1);
const char delim = host_port.length() >= sizeof(localhost) ? host_port[sizeof(localhost) - 1] : '/';
if ((delim != '/') || !host.equalsNoCase(localhost))
pr_error(status, "nbackup needs local access to database file");
}