This is the mail archive of the
mailing list for the Cygwin project.
Qt5: QDir::mkpath() fails for /cygdrive/ paths
- From: David Stacey <drstacey at tiscali dot co dot uk>
- To: cygwin at cygwin dot com
- Date: Thu, 9 Jul 2015 20:14:57 +0100
- Subject: Qt5: QDir::mkpath() fails for /cygdrive/ paths
- Authentication-results: sourceware.org; auth=none
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 am using libQt5Core5-5.4.1-4 and libQt4-4.8.7-1 under cygwin-2.0.4-1.
I haven't had chance to try with Qt 5.4.2 (announced yesterday), so
apologies in advance if this is fixed already.
// 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 -lQt5Core
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