mirror of
https://github.com/edubart/otclient.git
synced 2025-10-18 21:43:26 +02:00
fix bug on how lua detect source paths
This commit is contained in:
@@ -105,10 +105,11 @@ bool Resources::directoryExists(const std::string& directoryName)
|
||||
|
||||
bool Resources::loadFile(const std::string& fileName, std::iostream& out)
|
||||
{
|
||||
std::string fullPath = resolvePath(fileName);
|
||||
out.clear(std::ios::goodbit);
|
||||
PHYSFS_file *file = PHYSFS_openRead(resolvePath(fileName).c_str());
|
||||
PHYSFS_file *file = PHYSFS_openRead(fullPath.c_str());
|
||||
if(!file) {
|
||||
flogError("ERROR: Failed to load file \"%s\": %s", fileName.c_str() % PHYSFS_getLastError());
|
||||
flogError("ERROR: Failed to load file \"%s\": %s", fullPath.c_str() % PHYSFS_getLastError());
|
||||
out.clear(std::ios::failbit);
|
||||
return false;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user