Facepunch / garrysmod-issues

Garry's Mod issue tracker
142 stars 56 forks source link

file.Exists * operator broken after the recent update #5705

Closed RavMda closed 8 months ago

RavMda commented 8 months ago

Details

The server is running x64 branch of gmod After the recent update, the * stopped working in file.Exists

Here's an example:

print(file.Exists("bin/gmsv_mysqloo_*.dll", "LUA"))
false
print(file.Exists("lua/bin/gmsv_mysqloo_*.dll", "GAME"))
false
print(file.Exists("lua/bin/gmsv_mysqloo_linux64.dll", "GAME"))
true
Grocel commented 8 months ago

It was an unintentional side effect and was removed to improve performance.

https://github.com/Facepunch/garrysmod-issues/issues/5674#issuecomment-1908148281

Please use: https://wiki.facepunch.com/gmod/util.IsBinaryModuleInstalled (It is available in every GMod branch) It is also saver to use. Using the wildcard method would also detect module files as installed, even if they are for the wrong OS or architecture. E.g. a win32 file on linux64 server, etc.

robotboy655 commented 8 months ago

It was not intentional since it only worked for LUA path.