[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Longfilename support functions?



Hi!

> > BTW: Under MagiCCP it seems not to set the index properly as mentioned
> > before.
> > The files are beeing loaded multiple times here...
> 
> Setting it to 0 won't hurt, but it won't help with MiNT + TOSDS either
> (where Fxattr() just returns an incrementing counter as index).

I see... so should the function be as follows?

GetFile( char *filename )
{
    if ( ! Dpathconf( filename, DP_CASE ) ) {
        XATTR xattr;
        res = Fxattr( 0, filename, &xattr );
    } else {
        xattr.dev = 0;
        xattr.index = 0;
        res = 0;
    }

    if (( res == 0 || ( res == EINVFN )) {
        /* store the index, dev and pathname*/
    } else {
        /* an error occured */
    }
}

Will this work?

regards

Stan