From 3ee183cb09a713f8ce033ced3e0dd7b1a0b2c640 Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Tue, 4 Sep 2012 08:27:49 -0400 Subject: [PATCH] Some archive view cleanup --- mystic/bbs_filebase.pas | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/mystic/bbs_filebase.pas b/mystic/bbs_filebase.pas index 16d61eb..5fe53c1 100644 --- a/mystic/bbs_filebase.pas +++ b/mystic/bbs_filebase.pas @@ -791,18 +791,21 @@ Var SR : ArcSearchRec; Begin Result := False; - Arc := New(PArchive, Init); + + If Not FileExist(FName) Then Exit; + + Arc := New(PArchive, Init); If Not Arc^.Name(FName) Then Begin - Dispose (Arc, Done); + Dispose (Arc, Done); If FileExist(FName) Then Begin - ExecuteArchive (FName, '', '_view_.tmp', 3); - Session.io.OutFile (Session.TempPath + '_view_.tmp', True, 0); - FileErase (Session.TempPath + '_view_.tmp'); - End; + ExecuteArchive (FName, '', '_view_.tmp', 3); - Result := True; + Result := Session.io.OutFile (Session.TempPath + '_view_.tmp', True, 0); + + FileErase (Session.TempPath + '_view_.tmp'); + End; Exit; End; @@ -894,15 +897,13 @@ Begin Result := 0; End; -Function TFileBase.ArchiveView (FName : String) : Boolean; +Function TFileBase.ArchiveView (FName: String) : Boolean; Var Mask : String[70]; Begin - Result := False; + Result := ArchiveList(FName); - If Not ArchiveList(FName) Then Exit; - - Result := True; + If Not Result Then Exit; Repeat Session.io.OutFull (Session.GetPrompt(304));