[Qt-interest] Invalid permissions for folder!

Iurii Gordiienko hordi at ukr.net
Thu Aug 27 13:40:49 CEST 2009


Hi    It has value  30583        
    
--- Original Message ---    
From: John McClurkin <jwm at nei.nih.gov>    
To: qt-interest at trolltech.com    
Date: 27 august, 14:13:29    
Subject: Re: [Qt-interest] Invalid permissions for folder!    
    
    Iurii Gordiienko wrote:    
>    
> Hi    
> I have a folder without "Read & Execute" permissions for me on WindowsXP.    
> For checking that I use code similar this, but it does not work (b    
> always is TRUE)... What's wrong?    
> QFile::Permissions perm = QFileInfo( "c:/ACCESS_DENIED/" ).permissions();    
>    
> bool    
> b = perm & QFile::ReadOwner;    
> b = perm & QFile::WriteOwner;    
> b = perm & QFile::ExeOwner;    
>    
> b = perm & QFile::ReadUser;    
> b = perm & QFile::WriteUser;    
> b = perm & QFile::ExeUser;    
>    
> b = perm & QFile::ReadGroup;    
> b = perm & QFile::WriteGroup;    
> b = perm & QFile::ExeGroup;    
>    
> b = perm & QFile::ReadOther;    
> b = perm & QFile::WriteOther;    
> b = perm & QFile::ExeOther;    
>    
>    
> Qt-4.5.2    
> Thanks    
>    
> --    
> With regards    
> Iurii Gordiienko    
>    
> <http://www.ukr.net/Y7o7lk/footer/38df05>    
Check the value of perm (printf("perm = %d\n", perm)). If it is -1 all    
of your tests would evaluate to true and it might indicate a failure of    
the QFileInfo constructor.    
_______________________________________________    
Qt-interest mailing list    
Qt-interest at trolltech.com    
http://lists.trolltech.com/mailman/listinfo/qt-interest    
    
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090827/984b3153/attachment.html 


More information about the Qt-interest-old mailing list