Case insensitive file_id.diz importing

This commit is contained in:
mysticbbs 2012-08-16 23:09:59 -04:00
parent afdbb10771
commit 8c1c5eaa16
3 changed files with 14 additions and 8 deletions

View File

@ -429,12 +429,15 @@ Function TFileBase.ImportDIZ (FN: String) : Boolean;
Var Var
tFile : Text; tFile : Text;
DizName : String;
Begin Begin
Result := False; Result := False;
ExecuteArchive (FBase.Path + FN, '', 'file_id.diz', 2); 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+} {$I-} Reset (tFile); {$I+}
If IoResult = 0 Then Begin If IoResult = 0 Then Begin
@ -454,7 +457,7 @@ Begin
Close (tFile); Close (tFile);
FileErase(Session.TempPath + 'file_id.diz'); FileErase(DizName);
While (Session.Msgs.MsgText[1] = '') and (FDir.DescLines > 0) Do While (Session.Msgs.MsgText[1] = '') and (FDir.DescLines > 0) Do
RemoveLine(1); RemoveLine(1);

View File

@ -3555,7 +3555,7 @@ Begin
MsgAdded := 0; MsgAdded := 0;
If Not OpenCreateBase(MsgBase, MBase) THen Exit; If Not OpenCreateBase(MsgBase, MBase) Then Exit;
Session.io.OutFull (Session.GetPrompt(231)); Session.io.OutFull (Session.GetPrompt(231));
@ -3966,7 +3966,7 @@ Begin
Close (DataFile); Close (DataFile);
Assign (ExtFile, Session.TempPath + 'todoor.ext'); Assign (ExtFile, FileFind(Session.TempPath + 'todoor.ext'));
{$I-} Reset (ExtFile); {$I+} {$I-} Reset (ExtFile); {$I+}
If IoResult = 0 Then Begin If IoResult = 0 Then Begin

View File

@ -20,6 +20,7 @@ Var
ListFile : File of RecFileList; ListFile : File of RecFileList;
DescFile : File; DescFile : File;
DizFile : Text; DizFile : Text;
DizName : String;
Base : RecFileBase; Base : RecFileBase;
List : RecFileList; List : RecFileList;
DirInfo : SearchRec; DirInfo : SearchRec;
@ -104,7 +105,9 @@ Begin
ExecuteArchive (Base.Path + List.FileName, '', 'file_id.diz', 2); 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+} {$I-} Reset (DizFile); {$I+}
If IoResult = 0 Then Begin If IoResult = 0 Then Begin
@ -133,7 +136,7 @@ Begin
Desc[1] := INI.ReadString(Header_UPLOAD, 'no_description', 'No Description'); Desc[1] := INI.ReadString(Header_UPLOAD, 'no_description', 'No Description');
End; End;
FileErase (TempPath + 'file_id.diz'); FileErase (DizName);
End Else Begin End Else Begin
List.DescLines := 1; List.DescLines := 1;
Desc[1] := INI.ReadString(Header_UPLOAD, 'no_description', 'No Description'); Desc[1] := INI.ReadString(Header_UPLOAD, 'no_description', 'No Description');