Slaynash / Lumbot

LUM Discord Bot
Other
16 stars 6 forks source link

[FEATURE REQUEST]: Add filename corruption detection #11

Closed Arkhorse closed 1 year ago

Arkhorse commented 1 year ago

Is your feature request related to a problem? Please describe.

If a filename is not exactly the same as the assembly name, the assembly may not work or just not work well. The behaviour of the assembly seems to be fairly random

Describe the solution you'd like

Simple detection of the file name compared with the assembly name. If they do not match, this is a fatal error. I have done some work for regex, if thats a method you want to use: (PCRE2): /[a-zA-Z]*\s\([0-999]*\).{1}dll/gm This would match any file which looks something like assemblyname (1).dll, which occurs whenever a user downloads a mod they already have in their downloads folder (usually the last version or versions)

Describe alternatives you've considered

Could just compare the filename with the assembly name, if this is easier than regex

Additional context

No response

rakosi2 commented 1 year ago

Since I added saving assembly name in commit def8e7b61fec1348882ef33b06fed15dccba3e10, this should be fairly simple to add. I should also be able to readd the hash checks again that I disabled in 3027d4e0032018ea617bbcc01a4e660d9218a826 because above commit should have added support for it.