From 4fa6cd8ceafc4cd70ca18363b37398da4b576aaf Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Tue, 2 May 2023 16:24:27 +0200 Subject: [PATCH] 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 Pick-to: 6.5 Change-Id: Ie7478b4accf279e8abf9f3849d18807cee99f085 Reviewed-by: Amir Masoud Abdol Reviewed-by: Qt CI Bot --- src/tools/syncqt/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/syncqt/main.cpp b/src/tools/syncqt/main.cpp index 405b4d7b85..6486e0d6fe 100644 --- a/src/tools/syncqt/main.cpp +++ b/src/tools/syncqt/main.cpp @@ -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()); } }