From 3ca09dda5b6c6a8ecef1b7aef693ad27a3a0f80e Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Thu, 30 Aug 2007 21:23:42 +0000 Subject: [PATCH] If no LFN is empty, create a lowercase name --- ChangeLog | 1 + mbfido/tic.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index cdb37ab7..2f1d7195 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/mbfido/tic.c b/mbfido/tic.c index 5a351735..3bdcecad 100644 --- a/mbfido/tic.c +++ b/mbfido/tic.c @@ -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)) { /*