I got Britannica Encyclopedia 2009 of dsl format from ru.board.
I compressed all the avi, jpg and wav files into one zip file named a.dsl.files.zip whose size is greater than 3.5GB, while the dsl file named a.dsl.
However, GD can't display any images, and can't play audio files either. The size of the index file in ~/.goldendict is only 2.5MB, much smaller than expected.
But when only compressing fewer files, everything is OK.
I traced the code and found the function File::exists () using the return value of stat () to determine whether a file exists or not, but when the file size is too large, stat () always returns 1.
Sample code:
- Code: Select all
int main(int argc, char *argv[])
{
struct stat buf;
int exist = 0;
if (stat( "/opt/goldendict/dictionary/BE/a.dsl.files.zip", &buf ) == 0) {
exist = 1;
} else {
perror ("STAT: ");
}
printf("exist = %d", exist);
return 0;
}
The output is :
- Code: Select all
STAT: : Value too large for defined data type
exist = 0
Ubuntu 8.04 + ext3 + kernel 2.6.24 + libc 2.7-10ubuntu5
Thanks.