Page 1 of 1

mkdir bug

Posted: Mon Aug 27, 2012 9:54 pm
by Oibaf
After an atempt of "mkdir" on a write protected WII SD card, it is impossibile to open in reading("r") a file. It is instead possibile to open in writing (w).

Try this with a write protected SD card:

if (!mkdir("tmp",0777)){printf("Making tmp directory\n"); }
else printf("Can not Make tmp directory\n");
FILE *f;
f=fopen("test.txt", "r");
if (f == NULL) printf("Impossible to open file in r\n");

Re: mkdir bug

Posted: Mon Aug 27, 2012 10:14 pm
by Oibaf
The test is to be made with a non existing dir.

I receive these errors:

1) I/O Error (5), when trying to make the dir
2) No such file or directory, when trying to open the file in reading