|
|
| al_findfirst cannot "see" other users files on linux? |
|
kronoman
Member #2,911
November 2002
|
Hi, I have this problem, my game searches for files using al_findfirst. ls /usr/share/games/kball/levels 10.map 14.map 2.map 5.map 8.map easy.fmp trainer.fmp 11.map 15.map 3.map 6.map 9.map hard.fmp 12.map 1.map 4.map 7.map deluxe.fmp medium.fmp
This files have the permissions: To read the dir, I'm doing ret = al_findfirst(path_str, &dir_reader,(FA_RDONLY | FA_HIDDEN | FA_SYSTEM | FA_LABEL | FA_ARCH)); while (!ret) { menu.add_item_to_menu(dir_reader.name); ret = al_findnext(&dir_reader); } al_findclose(&dir_reader); The path str and everything is set perfectly, in fact, if I change the owner of the same files in the same dir (/usr/blah) to the current user, the game will run perfectly. So, I think that is a Allegro fault. I need to store the things like that (in /usr/blah) to do the Debian package. So, well, how do I solve this ? (making al_findfirst find someone else owned files?) |
|
Elias
Member #358
May 2000
|
Can you post a small testcase? -- |
|
kronoman
Member #2,911
November 2002
|
damn, with the test code, I can see the files. Test code:
Test commands:
[kronoman@localhost kronoman]$ gcc test_alfindfirst.c -o test_alfindfirst.bin -Wall `allegro-config --libs` [kronoman@localhost kronoman]$ ./test_alfindfirst.bin starting file : 1.map file : 2.map file : 3.map file : 4.map file : 5.map done [kronoman@localhost kronoman]$
well, I'm clueless, my game uses almost the same code... but, when runs as normal user, I can't see the same files posted before. |
|
ReyBrujo
Moderator
January 2001
|
Are you sure the pattern your program is sending is right? -- |
|
kronoman
Member #2,911
November 2002
|
The pattern that is sending is ok, I have a trace system that goes dumping all the stuff that happens, and I checked and is OK. |
|
|