From 552ef5d0a066634ae541bf65d1076029aa88a8d3 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Mon, 2 Jun 2003 13:55:40 +0000 Subject: [PATCH] Fixed bug with case-sensitive filesystem --- src/include/fb_string.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/include/fb_string.h b/src/include/fb_string.h index c0115f44d9..bb4988a20f 100644 --- a/src/include/fb_string.h +++ b/src/include/fb_string.h @@ -38,27 +38,33 @@ namespace Firebird inline PathName(void) : string() {} inline bool operator<(const PathName &r) const { return CASE_SENSITIVITY ? - (*this < r) : (STRCASECMP(this->c_str(), r.c_str()) < 0); + (string(*this) < string(r)) : + (STRCASECMP(c_str(), r.c_str()) < 0); } inline bool operator<=(const PathName &r) const { return CASE_SENSITIVITY ? - (*this <= r) : (STRCASECMP(this->c_str(), r.c_str()) <= 0); + (string(*this) <= string(r)) : + (STRCASECMP(c_str(), r.c_str()) <= 0); } inline bool operator==(const PathName &r) const { return CASE_SENSITIVITY ? - (*this == r) : (STRCASECMP(this->c_str(), r.c_str()) == 0); + (string(*this) == string(r)) : + (STRCASECMP(this->c_str(), r.c_str()) == 0); } inline bool operator>=(const PathName &r) const { return CASE_SENSITIVITY ? - (*this >= r) : (STRCASECMP(this->c_str(), r.c_str()) >= 0); + (string(*this) >= string(r)) : + (STRCASECMP(this->c_str(), r.c_str()) >= 0); } inline bool operator>(const PathName &r) const { return CASE_SENSITIVITY ? - (*this > r) : (STRCASECMP(this->c_str(), r.c_str()) > 0); + (string(*this) > string(r)) : + (STRCASECMP(this->c_str(), r.c_str()) > 0); } inline bool operator!=(const PathName &r) const { return CASE_SENSITIVITY ? - (*this != r) : (STRCASECMP(this->c_str(), r.c_str()) != 0); + (string(*this) != string(r)) : + (STRCASECMP(this->c_str(), r.c_str()) != 0); } }; }