Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.6.2, 5.9.0 RC
-
None
-
Qt5.6.2 msvc2015 32bits
Qt5.9RC1 msvc2015 64bits
windows 10 64bits
Description
Calling api canRead will block the file on windows 10 64bits. I attach a small project to reproduce the bug.
Things to noticed :
1 : copy img_links.txt to your shadow build folder
shadow_build
--debug
--release
--img_links.txt
2 : Create a folder "img" in shadow build folder
shadow_build
--debug
--release
--img
For more info, please go to https://forum.qt.io/topic/79789/cannot-rename-by-qfile-rename/9
static size_t num = 0; QImageReader reader(name); reader.setDecideFormatFromContent(true); reader.canRead(); //after calling can read, the file will be locked bool const can_rename = QFile::rename(name, QString("img/sos%1").arg(num++)); qDebug()<<"can rename:"<<can_rename;