Some mods ship with the library directory in the case "Library" (and in at least one case "LIbrary"). Since Windows uses a case insensitive filesystem, this does not pose a problem on that platform. Linux and Mac use a case-sensitive file system and therefore modloader doesn't see the files contained in the mod.
Consider looking for well know directories in a case-insensitive manner.
import os
def file_exists_insensitive(path):
directory, filename = os.path.split(path)
directory = directory or '.' # Handle root directory
filename_lower = filename.lower()
for f in os.listdir(directory):
if f.lower() == filename_lower:
return os.path.join(directory, f)
return None
Examples of mods with non-lowercase library directory:
Some mods ship with the library directory in the case "Library" (and in at least one case "LIbrary"). Since Windows uses a case insensitive filesystem, this does not pose a problem on that platform. Linux and Mac use a case-sensitive file system and therefore modloader doesn't see the files contained in the mod.
Consider looking for well know directories in a case-insensitive manner.
Examples of mods with non-lowercase library directory: