unix_root -> UNIX_ROOT static const

This commit is contained in:
Alexander Karatarakis 2018-05-04 16:49:07 -07:00
parent 120f444af3
commit 9265fe76bf
1 changed files with 2 additions and 2 deletions

View File

@ -55,9 +55,9 @@ namespace vcpkg::Files
virtual fs::path find_file_recursively_up(const fs::path& starting_dir,
const std::string& filename) const override
{
static const fs::path UNIX_ROOT = "/";
fs::path current_dir = starting_dir;
fs::path unix_root = "/";
for (; !current_dir.empty() && current_dir != unix_root; current_dir = current_dir.parent_path())
for (; !current_dir.empty() && current_dir != UNIX_ROOT; current_dir = current_dir.parent_path())
{
const fs::path candidate = current_dir / filename;
if (exists(candidate))