Search code examples
qtwindows-7msys2

Why does qt report: There is no disk in the drive. Please Insert a disk in to \Device\Harddisk4\DR4?


Qt reports

There is no disk in the drive. Please Insert a disk in to \Device\Harddisk4\DR4 

during application startup. Other posts have reported this is caused by accessing missing removable drives, but in my case, I didn't have any. I wasn't calling QFileInfo().isreadable(), either. This was with an MSYS2 build of Qt 5.11.

Using procmon I was able to see that the last file access was to the current folder for a file qt.conf. Placing this file in the current folder was enough to get rid of the issue.

Previous versions of Qt did not exhibit this behavior. This workaround isn't so bad, but it shouldn't be necessary.


Solution

  • After updating to a newer build of Qt 5.11 in msys2, the issue went away.