Skip to content

Commit

Permalink
Add new error case
Browse files Browse the repository at this point in the history
  • Loading branch information
fpetrini15 committed Oct 18, 2024
1 parent 74d1887 commit d277f13
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/shared_library.cc
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,13 @@ SharedLibrary::AddAdditionalDependencyDir(
#ifdef _WIN32
const std::wstring PATH(L"Path");

if (additional_path.back() != ';') {
return Status(
Status::Code::INVALID_ARG,
"backend config parameter \"additional-dependency-dirs\" is malformed. "
"Each additional path provided should terminate with a ';'.");
}

DWORD len = GetEnvironmentVariableW(PATH.c_str(), NULL, 0);
if (len > 0) {
original_path.resize(len);
Expand Down

0 comments on commit d277f13

Please sign in to comment.