Hi Ralf, >> bolitare >> Extra menu/change background >> double-click BG >> select a JPG file >> click select background >> Sometimes, seldomly, the bug is triggered >> >> I checked a bit the source code. >> >> Files seems to be read with (in browser.c): >> void initialize_dir_file() >> { >> int done,i; >> > browser.dir_selected=-1; >> browser.file_selected=-1; >> >> browser.dir_n=0; >> done=al_findfirst("*.*",&ffblk,FA_DIREC | FA_RDONLY| FA_ARCH); >> while (!done) >> { >> if(strcmp(ffblk.name,".")!=0 && strcmp(ffblk.name,"..")!=0 >> &&ffblk.attrib!=0 && ffblk.attrib!=1 && ffblk.attrib!=32 && ffblk.attrib!=33) >> { >> strcpy(directory[browser.dir_n].name,ffblk.name); >> directory[browser.dir_n].selected=0; >> browser.dir_n=browser.dir_n+1; >> } >> done = al_findnext(&ffblk); >> } >> al_findclose(&ffblk); >> browser.first_dir_n=0; >> >> browser.file_n=0; >> if(browser.mode==2) >> done=al_findfirst("*.jpg",&ffblk,FA_ARCH|FA_RDONLY); >> else >> done=al_findfirst("*.mp3",&ffblk,FA_ARCH|FA_RDONLY); >> >> while (!done) >> { >> strcpy(file[browser.file_n].name,ffblk.name); >> file[browser.file_n].selected=0; >> file[browser.file_n].size=ffblk.size; >> done = al_findnext(&ffblk); >> // textprintf_ex(form1,data[XSANS2].dat,350,150+i*20,colour.black,-1,"%d >> %d",FA_ARCH,FA_RDONLY); >> browser.file_n=browser.file_n+1; >> } >> al_findclose(&ffblk); >> browser.first_file_n=0; >> >> } >> >> Frankly... not gone any conclusion from this code.
> Don't have the time to check right now, but I would bet that it is the > findfirst() that craps out, as with LFN, the structure of ffblk is likely > only accounting for a "regular" 8.3 filename, space wise, but gets a longer > result back from the LFN enabled kernel file functions... most likely not so. It's certainly the right corner to look (all pointers point into this direction), but: the usual implementation of findfirst() works with the "old" DOS 8.3 API and doesn't expose LFN to the rest of the world. the LFN API is completely separate. At least in theory... al_findfirst() seems to be implemented by the GCC RTL. This might as well be a bug in this implementation. time for someone with a debugger at hand to look into this... Tom _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel