summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2023-05-02 16:24:27 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2023-05-05 04:42:37 +0000
commitcda6b4b9186e59468acb927c8e8cdea533142525 (patch)
treef6296121d40fd75275a4af0016a404f5c52effc6
parent7e331e717da10ce78b5d6875c0d57f059acc5039 (diff)
downloadqtbase-cda6b4b9186e59468acb927c8e8cdea533142525.tar.gz
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: Jani Heikkinen <jani.heikkinen@qt.io>
-rw-r--r--src/tools/syncqt/main.cpp2
1 files changed, 1 insertions, 1 deletions
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());
}
}