From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21667 invoked by alias); 9 Jul 2015 19:15:05 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 21658 invoked by uid 89); 9 Jul 2015 19:15:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_COUK,SPF_PASS autolearn=no version=3.3.2 X-HELO: out.ipsmtp2nec.opaltelecom.net Received: from out.ipsmtp2nec.opaltelecom.net (HELO out.ipsmtp2nec.opaltelecom.net) (62.24.202.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Thu, 09 Jul 2015 19:15:03 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2C6AQCIx55V/z9X0lUNTodmuGWHDQOCLwEBAQEBAYVYFUA2AgUWCwILAwIBAgFYCAEBwFJwllaBIY9NglKBQwWMKoUbgmikZ4QigzkBAQE X-IPAS-Result: A2C6AQCIx55V/z9X0lUNTodmuGWHDQOCLwEBAQEBAYVYFUA2AgUWCwILAwIBAgFYCAEBwFJwllaBIY9NglKBQwWMKoUbgmikZ4QigzkBAQE Received: from 85-210-87-63.dynamic.dsl.as9105.com (HELO [127.0.0.1]) ([85.210.87.63]) by out.ipsmtp2nec.opaltelecom.net with ESMTP; 09 Jul 2015 20:14:59 +0100 To: cygwin@cygwin.com From: David Stacey Subject: Qt5: QDir::mkpath() fails for /cygdrive/ paths Message-ID: <559EC831.9030404@tiscali.co.uk> Date: Thu, 09 Jul 2015 19:15:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00176.txt.bz2 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. Dave. // 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 #include #include int main(int argc, char** argv) { if (argc != 2) std::cerr << "Syntax: create_directory "; else { QDir dir(QDir::currentPath()); if (!dir.mkpath(argv[1])) std::cerr << "Failed to create directory '" << argv[1] << "'." << std::endl; } return 0; } -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple