Utils: Somewhat improve remote FilePath::canonicalPath()

At least keep the remoteness.

Change-Id: I80c865d7b5c7d2dbca6ea6c4c269ef144a7d144c
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2021-06-01 14:15:06 +02:00
parent ba9f5ec3bb
commit 93ca1a87a5

View File

@@ -254,6 +254,10 @@ FilePath FileUtils::resolveSymlinks(const FilePath &path)
*/
FilePath FilePath::canonicalPath() const
{
if (needsDevice()) {
// FIXME: Not a full solution, but it stays on the right device.
return *this;
}
const QString result = toFileInfo().canonicalFilePath();
if (result.isEmpty())
return *this;