delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/08/12/18:00:02

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=RQK0+h6s9VAhyBiR
rUX+H56gu4MflQAI3KywkTG/HSHUm1TW0lCEoS3Fi63qHuT9Y5+M5ylp/EOnaWSk
0VyipXs23betZDdavJaOC6NEm74VbpVGpKS09XT3hsrGwBGkjUr+G0tNpjOW2Gtv
scazf258cCzWSUWprWp+eTW2slM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=J1LQvGjpruzpzbEbi2QFO8
OINN8=; b=Ac81F2SaBzKF02pee1jCkXzOKHoeAo9VQwD0aqF/N9EaDfSAitnc8u
fMuyzC0xkBH5tcw/iR1eY5+HiQU9d9DgrTXgJZ+wJwPdYbHWN2DanA/vH5dnXh9n
20QZCoUNVjqEcOsJ+2oyuuWLISKJFwRG/qvOsXXxm69rdmS2gbGXY=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A2CtAQCEwctV/3Zd0lUNUId8v3CCUQMCAoF5EQEBAQEBAQGFLgEBBCMVQBELGAICBRYLAgIJAwIBAgFFEwgBAcF+cZYvAQEIAgEfgSKKMYUQF4JSgUMFhxqFP4ErhAeDCKZ9hCSDPAEBAQ
X-IPAS-Result: A2CtAQCEwctV/3Zd0lUNUId8v3CCUQMCAoF5EQEBAQEBAQGFLgEBBCMVQBELGAICBRYLAgIJAwIBAgFFEwgBAcF+cZYvAQEIAgEfgSKKMYUQF4JSgUMFhxqFP4ErhAeDCKZ9hCSDPAEBAQ
Subject: Re: Qt5: QDir::mkpath() fails for /cygdrive/ paths
To: cygwin AT cygwin DOT com
References: <559EC831 DOT 9030404 AT tiscali DOT co DOT uk>
From: David Stacey <drstacey AT tiscali DOT co DOT uk>
Message-ID: <55CBC1CD.6050801@tiscali.co.uk>
Date: Wed, 12 Aug 2015 22:59:41 +0100
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>
X-IsSubscribed: yes

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 <QtCore/QDir>
#include <iostream>

int main(int argc, char** argv)
{
   if (argc != 2)
     std::cerr << "Syntax: create_directory <name>";
   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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019