From fd36a88a7ef18c7ab242a4b0f08d601546282533 Mon Sep 17 00:00:00 2001 From: ffreyer Date: Sun, 14 Jul 2024 16:49:09 +0200 Subject: [PATCH] normalize path syntax and allow broken paths --- src/io/obj.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/io/obj.jl b/src/io/obj.jl index cb5b8c7..16c2884 100644 --- a/src/io/obj.jl +++ b/src/io/obj.jl @@ -486,8 +486,9 @@ function parse_texture_info(parent_path::String, lines::Vector{SubString{String} filepath = filepath * ' ' * lines[i] i += 1 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 else