Normalize paths using std::filesystem::weakly_canonical

std::filesystem::weakly_canonical resolves symbolic links in paths.
This allows syncqt to work with paths that are symbolic links and
real paths.

Fixes: QTBUG-113295
Change-Id: Ie7478b4accf279e8abf9f3849d18807cee99f085
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 4fa6cd8ceafc4cd70ca18363b37398da4b576aaf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexey Edelev 2023-05-02 16:24:27 +02:00 committed by Qt Cherry-pick Bot
parent a151f3461c
commit 7082526d5d

View File

@ -110,7 +110,7 @@ void printInternalError()
std::filesystem::path normilizedPath(const std::string &path)
{
return std::filesystem::path(std::filesystem::absolute(path).generic_string());
return std::filesystem::path(std::filesystem::weakly_canonical(path).generic_string());
}
}