Fixing module name check with windows backspace path

main
Alexander Neff 2023-12-24 22:16:27 +01:00
parent dcbb01a39e
commit 5809a1470a
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class ModuleLoader:
if not hasattr(module, "name"):
self.logger.fail(f"{module_path} missing the name variable")
module_error = True
elif hasattr(module, "name") and module.name != module_path.split("/")[-1][:-3]:
elif hasattr(module, "name") and module.name != module_path.split("/")[-1].split("\\")[-1][:-3]:
self.logger.fail(f"{module_path} filename must match the module name {module.name}")
module_error = True
elif not hasattr(module, "description"):