If no LFN is empty, create a lowercase name

This commit is contained in:
Michiel Broek 2007-08-30 21:23:42 +00:00
parent 8adc6a0897
commit 3ca09dda5b
2 changed files with 8 additions and 0 deletions

View File

@ -32,6 +32,7 @@ v0.91.10 21-Aug-2007
mbfido:
Fixed a lot of compiler warnings.
Fixed compiling on NetBSD 3.1.
If no LFN is empty, create a lowercase name.
mbdiff:
Fixed a lot of compiler warnings.

View File

@ -523,6 +523,13 @@ int LoadTic(char *inb, char *tfn, orphans **opl)
strcpy(TIC.TicIn.FullName, RealName);
}
Syslog('f', "Real filename in inbound is \"%s\"", RealName);
if ((strlen(TIC.TicIn.FullName)) == 0) {
Syslog('f', "LFN is empty, create lowercase one");
strncpy(TIC.TicIn.FullName, RealName, 255);
for (i = 0; i < strlen(TIC.TicIn.FullName); i++)
TIC.TicIn.FullName[i] = tolower(TIC.TicIn.FullName[i]);
}
Syslog('+', "8.3 name \"%s\", LFN \"%s\"", TIC.TicIn.File, TIC.TicIn.FullName);
if (strcmp(RealName, TIC.TicIn.File)) {
/*