Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Testing and Deployment

Reply
Developer
Posts: 124
Registered: ‎01-29-2011
My Device: Z10, PlayBook
My Carrier: Koodo

Re: Shared subdirectories inaccessible to Cascades based App

Ok, so it's not just a problem with 64GB...

Highlighted
Developer
Posts: 76
Registered: ‎02-08-2013
My Device: z10
My Carrier: rogers

Re: Shared subdirectories inaccessible to Cascades based App

Figured it out.

 

The 'ls -lRi' on /accounts/1000/removable shows that all the files that don't show up using QDIr/QDirIterator have inodes greater than 32 bits. This seems to indicate that QDir and QDirIterator don't have large file support yet.

 

The solution to recusively list all files and directories on an HC SD card is to use the C code I posted above but to also put these lines in your .pro file:

DEFINES += _FILE_OFFSET_BITS=64
DEFINES += _LARGEFILE64_SOURCE=1

 

Cheers,

E.

Developer
Posts: 124
Registered: ‎01-29-2011
My Device: Z10, PlayBook
My Carrier: Koodo

Re: Shared subdirectories inaccessible to Cascades based App

[ Edited ]

Fantastic! Didn't occur to me to check the inodes.

 

Too bad that's not the default. 

Developer
Posts: 124
Registered: ‎01-29-2011
My Device: Z10, PlayBook
My Carrier: Koodo

Re: Shared subdirectories inaccessible to Cascades based App

Ugh. Missed the bit in your post about using the C code. So no QDirIterator. Makes that a bit of a useless API until it's fixed. I wonder what the built in file manager uses... Something else, apparently.

Contributor
Posts: 17
Registered: ‎08-01-2012
My Device: Blackberry 10 Alpha Device
My Carrier: None

Re: Shared subdirectories inaccessible to Cascades based App

Hi Everybody!

 

I would like to confirm that bug with file API exists and can be fixed by defining:

 

_FILE_OFFSET_BITS=64
_LARGEFILE64_SOURCE=1

 

or using readdir64() API directly.

 

I believe this is BB10 OS bug because only readdir64() is able to list files/directories with inode with > 64 bit value, readdir() does not list such items.

 

Best regards,

Dmitry.

Contributor
Posts: 17
Registered: ‎08-01-2012
My Device: Blackberry 10 Alpha Device
My Carrier: None

Re: Shared subdirectories inaccessible to Cascades based App

The ticket in JIRA was created for this issue:
https://www.blackberry.com/jira/browse/BBTEN-1133
Developer
Posts: 124
Registered: ‎01-29-2011
My Device: Z10, PlayBook
My Carrier: Koodo

Re: Shared subdirectories inaccessible to Cascades based App

I can't access that ticket. I submitted it previously as https://www.blackberry.com/jira/browse/BBTEN-878. Still marked "Triage". How hard is it to add in a couple compile flags for the Qt/Cascades libraries?

Developer
Posts: 124
Registered: ‎01-29-2011
My Device: Z10, PlayBook
My Carrier: Koodo

Re: Shared subdirectories inaccessible to Cascades based App

[ Edited ]

Although I guess one aspect of a more complete fix might be to get the QNX FAT32 driver to not generate inodes larger than 32 bits...

 

http://stackoverflow.com/questions/12322813/android-filesystem-and-inodes

 

EDIT: Nah. That might be limiting in the future.

Contributor
Posts: 17
Registered: ‎08-01-2012
My Device: Blackberry 10 Alpha Device
My Carrier: None

Re: Shared subdirectories inaccessible to Cascades based App

I can't access your ticket either and getting:

-------------------

Permission Violation

You cannot view this issue because you are not the issue reporter or assignee, a member of the project group, or a member of the issue group and this issue is closed or in triage.

-------------------

 

I can add comment in my ticket regarding your submission too in order to have them linked to each other.

 

That might be limiting in the future.

 

I think so too. It is better to fix 32-bit aware readdir() implementation so it would not skip entries with 64-bit inodes, moreover dirent structure does not have problem handling 64-bit inode value:

 

#elif !defined(_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS == 32

ino_t d_ino; /* File serial number. */
ino_t d_ino_hi;

 

Developer
Posts: 124
Registered: ‎01-29-2011
My Device: Z10, PlayBook
My Carrier: Koodo

Re: Shared subdirectories inaccessible to Cascades based App

878 closed as a duplicate of 1088: https://www.blackberry.com/jira/browse/BBTEN-1088