1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 10:36:38 +02:00

Use native file extensions on macOS and Windows.

This commit is contained in:
Sadie Powell
2024-01-09 14:35:49 +00:00
parent fc2df00cfc
commit fa7ad6b3df
3 changed files with 9 additions and 6 deletions
+3 -3
View File
@@ -55,7 +55,7 @@ void ModuleManager::CleanupRuntimeDirectory()
*/
static ModuleReturn moduleCopyFile(const Anope::string &name, Anope::string &output)
{
Anope::string input = Anope::ModuleDir + "/modules/" + name + ".so";
Anope::string input = Anope::ModuleDir + "/modules/" + name + DLL_EXT;
struct stat s;
if (stat(input.c_str(), &s) == -1)
@@ -133,7 +133,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u)
#ifdef _WIN32
/* Generate the filename for the temporary copy of the module */
Anope::string pbuf = Anope::DataDir + "/runtime/" + modname + ".so.XXXXXX";
Anope::string pbuf = Anope::DataDir + "/runtime/" + modname + DLL_EXT ".XXXXXX";
/* Don't skip return value checking! -GD */
ModuleReturn ret = moduleCopyFile(modname, pbuf);
@@ -146,7 +146,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u)
return ret;
}
#else
Anope::string pbuf = Anope::ModuleDir + "/modules/" + modname + ".so";
Anope::string pbuf = Anope::ModuleDir + "/modules/" + modname + DLL_EXT;
#endif
dlerror();