Fix import/export on *nix systems#4
Open
amberstarlight wants to merge 2 commits intoDummiesman:masterfrom
Open
Fix import/export on *nix systems#4amberstarlight wants to merge 2 commits intoDummiesman:masterfrom
amberstarlight wants to merge 2 commits intoDummiesman:masterfrom
Conversation
We should use the standard size and little-endian. Realistically, the only systems this will be run on are x86, x86_64, or ARM which are all modern architectures using little-endian encoding. We should also make sure we are using standard sizes. Unsigned longs on Windows are 4 bytes but on other sytems they are 8, so we should use the standard sizing, not the native system sizing as this isn't portable.
+ Use little-endian on all struck.pack and struct.unpack calls + Use case-insensitive file finder + Add .gitignore + Update addon version + Update README
9f27367 to
bd2d982
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have:
struct.unpackandstruct.packto always use little-endian and standard sizes..gitignoreReasoning:
Errors such as
unpack requires a buffer of x bytesare due to differences in systems' native sizes for types. For example, unsigned longs on Windows are 4 bytes but on other sytems they are 8. Thus, we should use the standard sizing and not the native system sizing as this isn't portable.The importing works fine on Windows because, despite NTFS being case-sensitive, functionally it isn't for software. To make this portable we should do thorough checks. I've chosen to do the simplest method here and
listdirthe directory to search and compare lowercased filenames.Added a gitignore because, while testing this repo, I ended up with lots of
.pycfiles which we don't want in the repo.Closes (I think!):