Skip to content

Commit

Permalink
normalize path syntax and allow broken paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreyer committed Jul 14, 2024
1 parent 2df6da8 commit fd36a88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/io/obj.jl
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,9 @@ function parse_texture_info(parent_path::String, lines::Vector{SubString{String}
filepath = filepath * ' ' * lines[i]
i += 1

Check warning on line 487 in src/io/obj.jl

View check run for this annotation

Codecov / codecov/patch

src/io/obj.jl#L483-L487

Added lines #L483 - L487 were not covered by tests
end
@info filepath
if isfile(filepath)
filepath = replace(filepath, "\\\\" => "/")
filepath = replace(filepath, "\\" => "/")
if isfile(filepath) || endswith(lowercase(filepath), r"\.(png|jpg|jpeg|tiff|bmp)")
output["filename"] = filepath
idx = i

Check warning on line 493 in src/io/obj.jl

View check run for this annotation

Codecov / codecov/patch

src/io/obj.jl#L489-L493

Added lines #L489 - L493 were not covered by tests
else
Expand Down

0 comments on commit fd36a88

Please sign in to comment.