Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for case-sensitive systems to parse from a folder #12

Open
OlavStornes opened this issue Feb 21, 2022 · 2 comments
Open

Allow for case-sensitive systems to parse from a folder #12

OlavStornes opened this issue Feb 21, 2022 · 2 comments

Comments

@OlavStornes
Copy link

Hi! Stumbled upon this package when i was scouting for some inspiration on parsers for fomod.

When attempting to parse a package with the first option, pyfomod assumes that the filename is moduleconfig.xml, which works fine in a case-insensitive file-system. However, when doing the same in a case-sensitive file-system (such as a file-system often used in linux), this fails.

Example

>>> x = pyfomod.parse(".")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/{REDACTED}/.local/lib/python3.10/site-packages/pyfomod/parser.py", line 272, in parse
    raise FileNotFoundError(
FileNotFoundError: [Errno 2] No such file or directory: 'moduleconfig.xml'
>>> x = pyfomod.parse(("./fomod/info.xml", "./fomod/ModuleConfig.xml"))
>>> x
<pyfomod.fomod.Root object at 0x7f12de46f880>
>>> 
@dh-nunes
Copy link
Owner

dh-nunes commented Feb 27, 2022 via email

@OlavStornes
Copy link
Author

Appreciate your response. I agree that this shouldn't be a big priority, especially if it's main usage is on windows.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants