sceIoOpen and the current folder

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Seddy
Posts: 8
Joined: Tue Apr 11, 2006 12:46 am
Location: Germany
Contact:

sceIoOpen and the current folder

Post by Seddy »

I have a liitle problem with sceIoOpen:
If I wan't to open a file in the folder of my game,
I type sceIoOpen"./filename.ext",PSP_O_RDONLY,0777);
what works well, but if I want to open a file for writing:
sceIoOpen("./filename.ext",PSP_O_WRONLY|PSP_O_CREAT,0777);
the MS-led isn't blinking and the file will not be created or modified.
What am I doing wrong?
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

The sce* functions seem a bit inconsistent with regard to the working directory. That's why all of the newlib functions (fopen etc) manage the working directory themselves, and always pass full paths to sce*. You might consider just using them.
Seddy
Posts: 8
Joined: Tue Apr 11, 2006 12:46 am
Location: Germany
Contact:

Post by Seddy »

Works fine.
Thanks.
Post Reply