Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Ceres6 committed Nov 14, 2023
1 parent b56e08a commit 33e97b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,9 @@ std::string PathResolve(Environment* env,
// the drive cwd is not available. We're sure the device is not
// a UNC path at this points, because UNC paths are always absolute.
std::string resolvedDevicePath;
credentials::SafeGetenv("=" + resolvedDevice);
path = resolvedDevicePath || env->GetCwd();
const std::string envvar = "=" + resolvedDevice;
credentials::SafeGetenv(envvar.c_str(), &resolvedDevicePath);
path = resolvedDevicePath.empty() ? env->GetCwd() : resolvedDevicePath;

// Verify that a cwd was found and that it actually points
// to our drive. If not, default to the drive's root.
Expand Down

0 comments on commit 33e97b3

Please sign in to comment.