Skip to content

Commit

Permalink
Make Symlink Target Canonical (#2563)
Browse files Browse the repository at this point in the history
  • Loading branch information
Trenly authored Sep 30, 2022
1 parent 5c4c0b4 commit 8d0996f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AppInstallerCommonCore/Filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ namespace AppInstaller::Filesystem

bool VerifySymlink(const std::filesystem::path& symlink, const std::filesystem::path& target)
{
const std::filesystem::path& symlinkTargetPath = std::filesystem::read_symlink(symlink);
return symlinkTargetPath == target;
const std::filesystem::path& symlinkTargetPath = std::filesystem::weakly_canonical(symlink);
return symlinkTargetPath == std::filesystem::weakly_canonical(target);
}

void AppendExtension(std::filesystem::path& target, const std::string& value)
Expand Down

0 comments on commit 8d0996f

Please sign in to comment.