diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-03-07 14:20:48 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-03-07 19:13:14 +0000 |
commit | 0348ee90a8b250c32b18c15d320f6a42a1ec1bb5 (patch) | |
tree | 3b7048220874fc7eb7bff62d1ce31c70df76f9e2 /tests/auto | |
parent | 9fb73a01dd860a8a8e80945d5591a081256b14e0 (diff) |
Make QDir::tempPath() canonical
To have a stable base for creating temporary files it's useful to have
the temporary path be not just cleaned, but also the canonical path, so
that any symlinks are resolved. This is e.g. the case on macOS, where
/tmp is symlinked to /private/tmp.
Fixes tests that compare paths, e.g:
FAIL! : tst_QDir::current(startup) Compared values are not the same
Actual (newCurrent.absolutePath()): "/private/var/folders/51/hhvngbjd36vbn1ncklb73g2h0000gn/T/tst_qdir-FACBOE"
Expected (currentDir) : "/var/folders/51/hhvngbjd36vbn1ncklb73g2h0000gn/T/tst_qdir-FACBOE"
[ChangeLog][QtCore] QDir::tempPath() now reports the canonical path
of the temporary directory, with any symlinks removed.
Change-Id: I20df9076c9869227f32740b196fd7ffb8b1b9ced
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
0 files changed, 0 insertions, 0 deletions