Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
pablode committed Jul 13, 2024
1 parent 464ee74 commit 72d8230
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/libguc/src/cgltf_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ namespace detail
{
TF_DEBUG(GUC).Msg("reading file %s\n", path);

if (strlen(path)>1 && path[0]=='.' && path[1]=='/') path += 2;
// ArResolver fails to resolve paths with prefix "./" - we remove it.
fs::path relativePath = fs::relative(path);
//fs::path parentPath = fs::path(path).parent_path();
fs::path relativePath = fs::relative(path, path);

ArResolver& resolver = ArGetResolver();
ArResolvedPath resolvedPath = resolver.Resolve(relativePath.string());
Expand Down
4 changes: 3 additions & 1 deletion src/libguc/src/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ namespace detail
{
TF_DEBUG(GUC).Msg("reading image %s\n", path);

if (strlen(path)>1 && path[0]=='.' && path[1]=='/') path += 2;
// ArResolver fails to resolve paths with prefix "./" - we remove it.
fs::path relativePath = fs::relative(path);
//fs::path parentPath = fs::path(path).parent_path();
fs::path relativePath = fs::path(path);//fs::relative(path, path);

ArResolver& resolver = ArGetResolver();
ArResolvedPath resolvedPath = resolver.Resolve(relativePath.string());
Expand Down

0 comments on commit 72d8230

Please sign in to comment.