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

Rebase of sd/improvements #27

Merged
merged 19 commits into from
Sep 7, 2015
Merged

Conversation

sjkelly
Copy link
Member

@sjkelly sjkelly commented Sep 6, 2015

Also try to make CI pass so we can get closer to publishing this.

SimonDanisch and others added 16 commits September 5, 2015 23:22
on windows it can also be \r\n
Best or worst idea ever!? lets find out...
Pro:
- we guarantee to read all these files, so we should test them
- better coverage
Con:
- Very Slow
- Packages should be removed if not added?! should we give an option to
install all IO packages anyways!? Or just put them all in the REQUIRE?
@dreammaker, you think that's sufficient?
Does that seem like a reasonable fix? It fixes my problems on windows,
but I'm not sure if there are any strings attached.
this seems even shadier...But windows does not guarantee \r\n.... So I'm
not sure how to best handle this. Maybe we should just drop windows
support entirely :D
I know there are also `\r` in magic bytes... but if we just ignore it
alltogether we might be fine!?
I'd be suprised if this won't byte us at some point....Bad pun intended.
@SimonDanisch
Copy link
Member

I don't really know why appveyor isn't picking up this PR, but it seems to work fine for master...

@SimonDanisch
Copy link
Member

I'm inclined to merge this and tag FileIO. I'm not sure if I forgot anything, but most of the problems should now be in external packages. Images will take some more time but if we tag now we can at least advance with Meshes.

@@ -254,7 +258,7 @@ function query(filename::AbstractString)
if haskey(ext2sym, ext)
sym = ext2sym[ext]
len = lenmagic(sym)
if length(len) == 1 && (all(x->x==0, len) || !isfile(filename)) # we only found one candidate and there is no magic bytes, or no file, trust the extension
if length(len) == 1 && (((all(x->x==0, len) || !isfile(filename))) || !isfile(filename)) # we only found one candidate and there is no magic bytes, or no file, trust the extension
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parenthesis are not needed here.

@sjkelly
Copy link
Member Author

sjkelly commented Sep 6, 2015

@timholy any objections to merging this? I think we are antsy to get MeshIO published. Semver should allow us to tag and if we need to make any API changes it can bump the minor version. Anything that gets registered can come in as a patch version bump.

@@ -254,7 +258,7 @@ function query(filename::AbstractString)
if haskey(ext2sym, ext)
sym = ext2sym[ext]
len = lenmagic(sym)
if length(len) == 1 && (all(x->x==0, len) || !isfile(filename)) # we only found one candidate and there is no magic bytes, or no file, trust the extension
if length(len) == 1 && ((all(x->x==0, len) || !isfile(filename)) || !isfile(filename)) # we only found one candidate and there is no magic bytes, or no file, trust the extension
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused about this line: aren't you effectively doing isfile(filename) twice?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhm, I thought I cleaned that up... Definitely wrong :D

@timholy
Copy link
Member

timholy commented Sep 6, 2015

No objections here, merge when ready.

sjkelly added a commit that referenced this pull request Sep 7, 2015
@sjkelly sjkelly merged commit 5549f18 into master Sep 7, 2015
@sjkelly sjkelly deleted the sjk/tagtagtag_thats_my_new_catchphrase branch September 7, 2015 03:37
@sjkelly sjkelly mentioned this pull request Sep 8, 2015
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.

3 participants