- Status Closed
- Percent Complete
- Task Type Bugs
- Category User Interface → Simulator
- Assigned To No-one
- Operating System Gigabeat F/X
- Severity Low
- Priority Very Low
- Reported Version Daily build (which?)
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#8532 - Code works properly on Sim but not on Target
I have a Gigabeat F40.
I wanted to make a small plugin for myself that traversed directories. To skip the first two files ('.' and '..') I used the following code:
DIR* dir; holds the current directory
struct dirent *entry; holds the current file
char dirPath[MAX_PATH]; //holds the path to the current directory
dir = rb->opendir(dirPath); entry = rb->readdir(dir); entry = rb->readdir(dir);
In the simulator the code above worked. After the two readdir() statements entry would contain the first file in the directory.
On the actual target entry would still contain '.' .
I apologize if I reported this without following all proper procedures. If you need more information please let me know.
Thank you.
2008-01-31 06:57
Reason for closing: Fixed
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
problem solved…
for next time.. this isnt the best place
for this sort of support… irc or the
dev mailing list
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
I think on target the code always uses dircache. For FAT, the . and .. entries must always come first, but I'm not sure what dircache does with it.
This is what I used for the properties plugin:
Have a look at the properties plugin, it contains all the directory traversal code you need ;)
I did get my plugin to work it's just I thought this was a bug so I reported, thank you though for your help.
I actually looked to the stats plugin for help and my if statement looks the same as your example except I didn't use the 'not' operator in front of the strcmp calls.
Again thank you for the help.