bug fix, preserve filename case for `codemodel', `load' and `use'
reported and fixed by Emil Lambrache in bug tracker "case sensitivity not preserved for file names - ID: 3611642" https://sourceforge.net/tracker/?func=detail&atid=423915&aid=3611642&group_id=38962
This commit is contained in:
parent
1f1d2db296
commit
3f971d0d8e
|
|
@ -614,10 +614,23 @@ inp_readall(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile
|
|||
/* loop through 'buffer' until end is reached. Then test for
|
||||
premature end. If premature end is reached, spew
|
||||
error and zap the line. */
|
||||
if (!ciprefix("write", buffer)) { // exclude 'write' command so filename case preserved
|
||||
{
|
||||
char *s;
|
||||
for (s = buffer; *s && (*s != '\n'); s++)
|
||||
*s = (char) tolower(*s);
|
||||
|
||||
if ( !ciprefix("write", buffer) &&
|
||||
!ciprefix("codemodel", buffer) &&
|
||||
!ciprefix("use", buffer) &&
|
||||
!ciprefix("load", buffer)
|
||||
)
|
||||
{
|
||||
for (s = buffer; *s && (*s != '\n'); s++)
|
||||
*s = (char) tolower(*s);
|
||||
} else {
|
||||
// exclude some commands to preserve filename case
|
||||
for (s = buffer; *s && (*s != '\n'); s++)
|
||||
;
|
||||
}
|
||||
|
||||
if (!*s) {
|
||||
// fprintf(cp_err, "Warning: premature EOF\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue