MAK-Relic-Tool / Issue-Tracker

Central Bug Tracker / Issues Board for the MAK Relic Tool
0 stars 0 forks source link

EssenceDriveFS not respecting `\\` separator #39

Closed ModernMAK closed 11 months ago

ModernMAK commented 11 months ago

Seems to be a regression that happened when moving to PyFilesystem.

Going by Relic Archive Viewer, the sample sga was properly constructed when using the deprecated ArchiveIO format. But packing using the Assembler/Dissasembler does not work.

ModernMAK commented 11 months ago

Python is using \\, which doesn't act as a directory separator for the _EssenceDriveFS, which is problematic when python provides a \\ separated string.

This requires special handling in _EssenceDriveFS's validatepath function.

Specifically for the CLI in #35 this will cause a ResourceNotFoundError which is intended beheaviour for opening a file in a directory that doesn't exist and requires a hotfix.

Since Core requires a patch, could roll the CLI into it and update the readme.

Also; the issue was not in SGA Core Dissassembler, as I had originally thought, name should be updated.

ModernMAK commented 11 months ago

Not all functions use validate path, which is annoying.

makedirs uses tools.get_intermediate_dirs(...) which does not respect \\ meaning we need to override it and coerce seperators before calling the parent function