winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 8d0996fc4921261b3eb46b0351793f53e8e918f4
parent 5c4c0b44157322b4c305af9b6c6a17ed77a2213e
Author: Kaleb Luedtke <trenlymc@gmail.com>
Date:   Fri, 30 Sep 2022 18:45:21 -0500

Make Symlink Target Canonical (#2563)


Diffstat:
Msrc/AppInstallerCommonCore/Filesystem.cpp | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/AppInstallerCommonCore/Filesystem.cpp b/src/AppInstallerCommonCore/Filesystem.cpp @@ -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)