From 7bd13f3ccb3f35497e45a9418a47043d95ca46f9 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 18 Oct 2010 23:51:50 +0200 Subject: [PATCH] Fixed: Bad detection if a file is in a BNP under Linux --- .../client/src/interface_v3/interface_parser.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/interface_parser.cpp b/code/ryzom/client/src/interface_v3/interface_parser.cpp index f85992bb8..f09df1f4a 100644 --- a/code/ryzom/client/src/interface_v3/interface_parser.cpp +++ b/code/ryzom/client/src/interface_v3/interface_parser.cpp @@ -4703,12 +4703,13 @@ bool CInterfaceParser::loadLUA(const std::string &fileName, std::string &error) } bool isInData = false; - if (pathName.find ("@") != string::npos) + std::string::size_type pos = pathName.find("@"); + if (pos != string::npos) { - if (CBigFile::getInstance().getBigFileName(pathName.substr(0, pathName.find ("@"))) != "data/"+pathName.substr(0, pathName.find ("@"))) - isInData = false; - else - isInData = true; + std::string bigFilename = CBigFile::getInstance().getBigFileName(pathName.substr(0, pos)); + std::string path = "data/"+pathName.substr(0, pos); + + isInData = bigFilename.find(path) != std::string::npos; } if (needCheck && !isInData)