提交 fb72afd1 编写于 作者: L Leandro Pereira 提交者: Leandro A. F. Pereira

Skip pal::realpath() error logging while probing directories

Both paths calling pal::realpath() and check its return value to see if
the probed paths actually exist in the filesystem; they do have logic
to handle those paths not existing, and printing error messages while
doing so isn't helpful for the user.

This happens when an application is published with one user but is
executed with another user -- for instance, when using containers (see
issue dotnet/core-setup#4038 for details).

Fixes dotnet/core-setup#4038.


Commit migrated from https://github.com/dotnet/core-setup/commit/024d2c0150c1ea356cfb33b2bcec91b39509084c
上级 a7d7bc5a
......@@ -216,7 +216,7 @@ void append_probe_realpath(const pal::string_t& path, std::vector<pal::string_t>
{
pal::string_t probe_path = path;
if (pal::realpath(&probe_path))
if (pal::realpath(&probe_path, true))
{
realpaths->push_back(probe_path);
}
......@@ -239,7 +239,7 @@ void append_probe_realpath(const pal::string_t& path, std::vector<pal::string_t>
segment.append(tfm);
probe_path.replace(pos_placeholder, placeholder.length(), segment);
if (pal::realpath(&probe_path))
if (pal::realpath(&probe_path, true))
{
realpaths->push_back(probe_path);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册