Skip to content

Commit

Permalink
fix: ci errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ceres6 committed Nov 22, 2023
1 parent 13c554a commit c7ac444
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/permission/fs_permission.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void FSPermission::Apply(Environment* env,
}
return;
}
GrantAccess(scope, PathResolve(env, { res }));
GrantAccess(scope, PathResolve(env, {res}));
}
}

Expand Down
6 changes: 4 additions & 2 deletions src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ std::string NormalizeString(const std::string_view path,
}

#ifdef _WIN32
bool IsWindowsDeviceRoot(const char c) const noexcept {
bool IsWindowsDeviceRoot(const char c) noexcept {
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
}

Expand Down Expand Up @@ -933,9 +933,11 @@ std::string PathResolve(Environment* env,
std::string resolvedPath;
bool resolvedAbsolute = false;
auto cwd = env->GetCwd(env->exec_path());
const size_t numArgs = paths.size();

for (int i = numArgs - 1; i >= -1 && !resolvedAbsolute; i--) {
const std::string& path = (i >= 0) ? std::string(paths[i]) : env->GetCwd(env->exec_path());
const std::string& path =
(i >= 0) ? std::string(paths[i]) : env->GetCwd(env->exec_path());
/* validateString(path, "paths[" + std::to_string(i) + "]"); */

if (!path.empty()) {
Expand Down

0 comments on commit c7ac444

Please sign in to comment.