mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 00:03:03 +01:00
Hope the last fix of nbackup host case insensitive cutting. Sorry.
This commit is contained in:
parent
2c8a258ae5
commit
366a58e3a7
@ -275,10 +275,12 @@ public:
|
|||||||
// Recognition of local prefix allows to work with
|
// Recognition of local prefix allows to work with
|
||||||
// database using TCP/IP loopback while reading file locally.
|
// database using TCP/IP loopback while reading file locally.
|
||||||
// RS: Maybe check if host is loopback via OS functions is more correct
|
// RS: Maybe check if host is loopback via OS functions is more correct
|
||||||
PathName db(_database), host;
|
PathName db(_database), host_port;
|
||||||
if (ISC_extract_host(db, host, false) == ISC_PROTOCOL_TCPIP)
|
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");
|
pr_error(status, "nbackup needs local access to database file");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user