Fix save for relative symbolic links on Windows

Works around QTBUG-62802.

Change-Id: I2edacb6d368e28fa240e7a866692391cf67f0ca2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
Orgad Shaneh
2017-08-24 07:53:15 +03:00
committed by Orgad Shaneh
parent 9a1030cfab
commit 410e78e4fd

View File

@@ -223,7 +223,7 @@ FileName FileUtils::resolveSymlinks(const FileName &path)
QFileInfo f = path.toFileInfo();
int links = 16;
while (links-- && f.isSymLink())
f.setFile(f.symLinkTarget());
f.setFile(f.dir(), f.symLinkTarget());
if (links <= 0)
return FileName();
return FileName::fromString(f.filePath());