From 8c1c5eaa160f43d7c8f35887c549c1af0d08d76f Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Thu, 16 Aug 2012 23:09:59 -0400 Subject: [PATCH] Case insensitive file_id.diz importing --- mystic/bbs_filebase.pas | 9 ++++++--- mystic/bbs_msgbase.pas | 6 +++--- mystic/mutil_upload.pas | 7 +++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/mystic/bbs_filebase.pas b/mystic/bbs_filebase.pas index eb013c5..3da2b4c 100644 --- a/mystic/bbs_filebase.pas +++ b/mystic/bbs_filebase.pas @@ -428,13 +428,16 @@ Function TFileBase.ImportDIZ (FN: String) : Boolean; End; Var - tFile : Text; + tFile : Text; + DizName : String; Begin Result := False; ExecuteArchive (FBase.Path + FN, '', 'file_id.diz', 2); - Assign (tFile, Session.TempPath + 'file_id.diz'); + DizName := FileFind(Session.TempPath + 'file_id.diz'); + + Assign (tFile, DizName); {$I-} Reset (tFile); {$I+} If IoResult = 0 Then Begin @@ -454,7 +457,7 @@ Begin Close (tFile); - FileErase(Session.TempPath + 'file_id.diz'); + FileErase(DizName); While (Session.Msgs.MsgText[1] = '') and (FDir.DescLines > 0) Do RemoveLine(1); diff --git a/mystic/bbs_msgbase.pas b/mystic/bbs_msgbase.pas index b7da7cf..f11e451 100644 --- a/mystic/bbs_msgbase.pas +++ b/mystic/bbs_msgbase.pas @@ -3555,7 +3555,7 @@ Begin MsgAdded := 0; - If Not OpenCreateBase(MsgBase, MBase) THen Exit; + If Not OpenCreateBase(MsgBase, MBase) Then Exit; Session.io.OutFull (Session.GetPrompt(231)); @@ -3966,7 +3966,7 @@ Begin Close (DataFile); - Assign (ExtFile, Session.TempPath + 'todoor.ext'); + Assign (ExtFile, FileFind(Session.TempPath + 'todoor.ext')); {$I-} Reset (ExtFile); {$I+} If IoResult = 0 Then Begin @@ -3987,4 +3987,4 @@ Begin DirClean (Session.TempPath, ''); End; -End. +End. \ No newline at end of file diff --git a/mystic/mutil_upload.pas b/mystic/mutil_upload.pas index 395b8ec..5bf7553 100644 --- a/mystic/mutil_upload.pas +++ b/mystic/mutil_upload.pas @@ -20,6 +20,7 @@ Var ListFile : File of RecFileList; DescFile : File; DizFile : Text; + DizName : String; Base : RecFileBase; List : RecFileList; DirInfo : SearchRec; @@ -104,7 +105,9 @@ Begin ExecuteArchive (Base.Path + List.FileName, '', 'file_id.diz', 2); - Assign (DizFile, TempPath + 'file_id.diz'); + DizName := FileFind(TempPath + 'file_id.diz'); + + Assign (DizFile, DizName); {$I-} Reset (DizFile); {$I+} If IoResult = 0 Then Begin @@ -133,7 +136,7 @@ Begin Desc[1] := INI.ReadString(Header_UPLOAD, 'no_description', 'No Description'); End; - FileErase (TempPath + 'file_id.diz'); + FileErase (DizName); End Else Begin List.DescLines := 1; Desc[1] := INI.ReadString(Header_UPLOAD, 'no_description', 'No Description');