This is the mail archive of the
mailing list for the Cygwin project.
Re: Qt5: QDir::mkpath() fails for /cygdrive/ paths
- From: David Stacey <drstacey at tiscali dot co dot uk>
- To: cygwin at cygwin dot com
- Date: Wed, 12 Aug 2015 22:59:41 +0100
- Subject: Re: Qt5: QDir::mkpath() fails for /cygdrive/ paths
- Authentication-results: sourceware.org; auth=none
- References: <559EC831 dot 9030404 at tiscali dot co dot uk>
On 09/07/2015 20:14, David Stacey wrote:
QDir::mkpath() fails when creating paths that start '/cygdrive/'. This
problem is only shown with Qt5 (not Qt4), and only with paths that
start '/cygdrive/' (so running from my home directory '~' is fine).
This is not a permissions problem, as it works fine with Qt4.
Sample programme is below. Compile for Qt5 as per the comments. 'cd
/cygdrive/X' where X is a local drive where you have permissions to
create a directory. Run './create_directory new_dir' and it fails to
create the directory. Programme works fine when compiled with Qt4.
I have updated to libQt5Core5-5.4.2-2, and I'm still getting this
problem. Is anyone else able to reproduce this, or offer some insight as
to why it might be failing? For completeness, my example programme is
// Programme to create a directory.
// Works with Qt4:
// g++ -I/usr/include/qt4 -o create_directory create_directory.cpp -lQtCore
// Fails with Qt5 if run from a path starting '/cygdrive/', otherwise OK:
// g++ -I/usr/include/qt5 -o create_directory create_directory.cpp
int main(int argc, char** argv)
if (argc != 2)
std::cerr << "Syntax: create_directory <name>";
std::cerr << "Failed to create directory '"
<< argv << "'." << std::endl;
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple