Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jbkyang-nvi committed Jun 29, 2023
1 parent d1afafc commit 03c0701
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pb_env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <archive_entry.h>
#include <fts.h>

#include <boost/algorithm/string/predicate.hpp>
#include <cstdlib>
#include <cstring>
#include <iostream>
Expand Down Expand Up @@ -255,9 +256,7 @@ EnvironmentManager::ExtractIfNotExtracted(std::string env_path)
bool re_extraction = false;

// If the path is not a conda-packed file, then bypass the extraction process
std::size_t subStrPos = env_path.size() > 6 ? env_path.size() - 6 : 0;
std::string subPath = env_path.substr(subStrPos);
if (subPath != "tar.gz") {
if (!boost::algorithm::ends_with(env_path, "tar.gz")) {
LOG_MESSAGE(
TRITONSERVER_LOG_VERBOSE,
(std::string("Returning canonical path since EXECUTION_ENV_PATH does "
Expand Down

0 comments on commit 03c0701

Please sign in to comment.