From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56998 invoked by alias); 12 Aug 2015 21:59:49 -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 56990 invoked by uid 89); 12 Aug 2015 21:59:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.6 required=5.0 tests=AWL,BAYES_50,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; Wed, 12 Aug 2015 21:59:47 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CtAQCEwctV/3Zd0lUNUId8v3CCUQMCAoF5EQEBAQEBAQGFLgEBBCMVQBELGAICBRYLAgIJAwIBAgFFEwgBAcF+cZYvAQEIAgEfgSKKMYUQF4JSgUMFhxqFP4ErhAeDCKZ9hCSDPAEBAQ X-IPAS-Result: A2CtAQCEwctV/3Zd0lUNUId8v3CCUQMCAoF5EQEBAQEBAQGFLgEBBCMVQBELGAICBRYLAgIJAwIBAgFFEwgBAcF+cZYvAQEIAgEfgSKKMYUQF4JSgUMFhxqFP4ErhAeDCKZ9hCSDPAEBAQ Received: from 85-210-93-118.dynamic.dsl.as9105.com (HELO [127.0.0.1]) ([85.210.93.118]) by out.ipsmtp2nec.opaltelecom.net with ESMTP; 12 Aug 2015 22:59:43 +0100 Subject: Re: Qt5: QDir::mkpath() fails for /cygdrive/ paths To: cygwin@cygwin.com References: <559EC831.9030404@tiscali.co.uk> From: David Stacey Message-ID: <55CBC1CD.6050801@tiscali.co.uk> Date: Wed, 12 Aug 2015 21:59:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <559EC831.9030404@tiscali.co.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00184.txt.bz2 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 included below. 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