Hoi Bart, nice to hear from you!
> Tom is right. The truncation is standard documented behaviour. > It all goes via the internal implementation of TRUENAME > ( http://www.delorie.com/djgpp/doc/rbinter/id/50/31.html ) > where the path is converted to its fully qualified version. > quote: "letters are uppercased, forward slashes converted to backslashes, > asterisks converted to appropriate number of question marks, and > file and directory names are truncated to 8.3 if necessary." > There are 2 128-byte buffers at very specific locations in the DOS DS, > one for almost everything and the second for RENAME destinations. > Deviate from those 2 and you'll get compatibility issues quite quickly. > FD kernel's truename implementation is careful about the 128-byte > limit, if there is not enough space it returns an error, it does not > overflow as far as I can see. > This is all in the somewhat funnily named file newstuff.c: > https://github.com/FDOS/kernel/blob/master/kernel/newstuff.c > > Bart That indeed is a "funny" file name! And good to know that GITHUB is the place for the 2015 version, not SOURCEFORGE. Such things happen when I use a search engine to find specific source code... I am glad to read in line 539 that "multiple dots are ill-formed" and the code from line 510 to 556 implements countdown-style copy to prevent overflows. I guess the code is optimized for size or speed (why speed?) and not really for readability? The text between line 192 and 234 might be meant to be the comments for truename: Now, some extra defines between the comments and the actual code make it look as if truename has NO description right now: ... #define addChar(c) \ { \ if (p >= dest + SFTMAX) PATH_ERROR; /* path too long */ \ *p++ = c; \ } COUNT truename(const char FAR * src, char * dest, COUNT mode) { ... Finally, it would NOT have been obvious to me that the meaning of "Convert path components into 8.3 convention" (as in the newstuff.c source code comments themselves) is to SILENTLY TRUNCATE N.M to 8.3 if N > 8 or M > 3 or both, although RBIL indeed does say that for int 21.60, truename / canonicalize filename or path, that it involves truncation (the RBIL quote). Thanks again and welterusten :-) Eric _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel