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

make Lowercase DynamicAnimatioReplacer folder load #9

Closed
wants to merge 2 commits into from

Conversation

mathias0903
Copy link

DynamicAnimationReplacer allows it folder to be lowercase which means a few DAR animation mods has that folder lower cased, and due to StripReplacerPath in parsing not accounting for this, wouldn't be loaded. to fix this i simply added a extra check for lowercase following the pattern of the pervious checks.

it might be better to lowercase the a_path string and then find. so like default windows it will be case insensitive.
same with directoryPathStr in ReloadConfig in ReplacerMods. but i barley have any experience with c++, and string_view did not seem to have a easy function or the like to lower case it, so i leave that to someone else. that knows c++ and this code better.

this might seem like a small problem, since its rare for Animation mod to use a lowercase dynamicanimationreplacer folder, but since windows is by default case insensitive, so if the first animation mod you install uses lowercase all subsequent mods files will also be place in the lowercase folder. or in case of using something like mo2 with a virtual directory, if it loads a lowercase folder first same problem.

….cpp

DynamicAnimationReplacer allows it folder to be lowercase which means a few DAR animation mods has that folder lower cased, and therefor wouldn't be loaded.

however this problem could be compounded by using something like mo2 which makes a virtual directory, and since windows is case insensitive by default, if it finds the lower case folder first it will put all DynamicAnimationReplacer animations into a lowercase folder. making them all unable to be loaded.

a better solution would probably be to lowercase a_path and then find, but im still very new to c++ so thats beyond me for now.
@ersh1
Copy link
Owner

ersh1 commented Feb 11, 2024

Thanks! I've opted to do it case insensitively right away (in a few more places too) instead of merging.

@ersh1 ersh1 closed this Feb 11, 2024
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 this pull request may close these issues.

2 participants