Skip to content

Commit

Permalink
Fix deprecated boost filesystem functions
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwason committed Jul 27, 2024
1 parent d1979f4 commit 6610308
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tesseract_common/src/resource_locator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void GeneralResourceLocator::processToken(const std::string& token)
if (package_paths_.find(dir_name) == package_paths_.end())
package_paths_[dir_name] = dir->path().string();

dir.no_push(); // don't recurse into this directory.
dir.disable_recursion_pending(); // don't recurse into this directory.
}

++dir;
Expand Down Expand Up @@ -153,7 +153,7 @@ std::shared_ptr<Resource> GeneralResourceLocator::locateResource(const std::stri
}
}

if (!tesseract_common::fs::path(mod_url).is_complete())
if (!tesseract_common::fs::path(mod_url).is_absolute())
{
CONSOLE_BRIDGE_logWarn("Resource not handled: %s", mod_url.c_str());
return nullptr;
Expand Down
2 changes: 1 addition & 1 deletion tesseract_common/test/resource_locator_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TestResourceLocator : public tesseract_common::ResourceLocator
mod_url = package_path + mod_url;
}

if (!tesseract_common::fs::path(mod_url).is_complete())
if (!tesseract_common::fs::path(mod_url).is_absolute())
return nullptr;

return std::make_shared<tesseract_common::SimpleLocatedResource>(
Expand Down
2 changes: 1 addition & 1 deletion tesseract_common/test/tesseract_common_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class TestResourceLocator : public tesseract_common::ResourceLocator
mod_url = package_path + mod_url;
}

if (!tesseract_common::fs::path(mod_url).is_complete())
if (!tesseract_common::fs::path(mod_url).is_absolute())
return nullptr;

return std::make_shared<tesseract_common::SimpleLocatedResource>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ std::shared_ptr<Resource> TesseractSupportResourceLocator::locateResource(const
mod_url = package_path + mod_url;
}

if (!tesseract_common::fs::path(mod_url).is_complete())
if (!tesseract_common::fs::path(mod_url).is_absolute())
return nullptr;

return std::make_shared<SimpleLocatedResource>(
Expand Down

0 comments on commit 6610308

Please sign in to comment.