| www.delorie.com/archives/browse.cgi | search |
| 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:date:from:reply-to:message-id:to:subject | |
| :in-reply-to:references:mime-version:content-type | |
| :content-transfer-encoding; q=dns; s=default; b=YPVDVH1qnIhp+TuB | |
| yO55MIJlyN2dnQc5yzzZDU2uO1cZBHuZ3IbkqQMKCKGL+dfzYWJX4LK2JQHjmXdT | |
| GeVJCgqwBQbOCyCsfK08vLV97aUGtaRAqyTat2HDfXCfFPnkvF6bWted5Fs/1dpY | |
| D3XzOoTdtOcpK0PvFeCQnAdI5sE= | |
| 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:date:from:reply-to:message-id:to:subject | |
| :in-reply-to:references:mime-version:content-type | |
| :content-transfer-encoding; s=default; bh=8yPZy/Wg1KBV9CRasW/4/v | |
| b1nX4=; b=QxFl6ZBf2CVBVa4Nbt6yDFh+zOU2l5N/XwEERhzqzk0LW+ba+DT1aw | |
| 2Jl4kXQuLaRGCJ1SGmbCSD+kSfPTm33+5U1U2qAO0P/QIcn7m1Dhtu7a2eRn4F2g | |
| vhg/kBNxO7mjsjUv5lRVvE6GASbYV1gFYwu46utoxQmz2JHEYY4LI= | |
| 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=4.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 |
| X-HELO: | smtp.ht-systems.ru |
| Date: | Thu, 13 Aug 2015 02:44:01 +0300 |
| From: | Andrey Repin <anrdaemon AT yandex DOT ru> |
| Reply-To: | cygwin AT cygwin DOT com |
| Message-ID: | <314155874.20150813024401@yandex.ru> |
| To: | David Stacey <drstacey AT tiscali DOT co DOT uk>, cygwin AT cygwin DOT com |
| Subject: | Re: Qt5: QDir::mkpath() fails for /cygdrive/ paths |
| In-Reply-To: | <55CBC1CD.6050801@tiscali.co.uk> |
| References: | <559EC831 DOT 9030404 AT tiscali DOT co DOT uk> <55CBC1CD DOT 6050801 AT tiscali DOT co DOT uk> |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
Greetings, David Stacey!
>> 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.
QDir in Qt5 have known issues. A number of them. One serious issues is a
failure to treat international (UNICODE) paths. Probably related to all
unicode handling in that area.
Hang on the updates channel to see them resolved.
> 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;
> }
--
With best regards,
Andrey Repin
Thursday, August 13, 2015 02:37:16
Sorry for my terrible english...
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |