Removed FileMask IFDEF * should work in Windows and OSX/Linux

This commit is contained in:
mysticbbs 2012-02-24 12:27:05 -05:00
parent 389d07164a
commit e7fa616d06
4 changed files with 24 additions and 33 deletions

View File

@ -24,11 +24,6 @@ Uses
Const
WinConsoleTitle = 'Mystic Node ';
{$IFDEF UNIX}
FileMask = '*';
{$ELSE}
FileMask = '*.*';
{$ENDIF}
CopyID = 'Copyright (C) 1997-2012 By James Coyle. All Rights Reserved.';
DateTypeStr : Array[1..4] of String[8] = ('MM/DD/YY', 'DD/MM/YY', 'YY/DD/MM', 'Ask ');
GetKeyFunc : Function (Forced : Boolean) : Boolean = NIL;
@ -36,8 +31,6 @@ Const
Var
Screen : TOutput;
Input : TInput;
// input will be gone, client and screen will be passed.
CurRoom : Byte;
NodeMsgFile : File of NodeMsgRec;
NodeMsg : NodeMsgRec;
@ -57,7 +50,7 @@ Procedure EditAccessFlags (Var Flags : AccessFlagType);
Function DrawAccessFlags (Var Flags : AccessFlagType) : String;
Function NoGetKeyFunc (Forced : Boolean) : Boolean;
Function getColor (A: Byte) : Byte;
Procedure KillRecord (var dFile; RecNum: LongInt; RecSize: Word);
Procedure KillRecord (Var dFile; RecNum: LongInt; RecSize: Word);
Procedure AddRecord (var dFile; RecNum: LongInt; RecSize: Word);
Function Bool_Search (Mask: String; Str: String) : Boolean;
Function strAddr2Str (Addr: RecEchoMailAddr) : String;
@ -251,7 +244,6 @@ End;
Function ShellDOS (ExecPath: String; Command: String) : LongInt;
Var
RetVal : Integer;
{$IFNDEF UNIX}
Image : TConsoleImageRec;
{$ENDIF}
@ -281,13 +273,13 @@ Begin
If ExecPath <> '' Then DirChange(ExecPath);
{$IFDEF UNIX}
RetVal := Shell (Command);
Result := Shell (Command);
{$ENDIF}
{$IFDEF WINDOWS}
If Command <> '' Then Command := '/C' + Command;
Exec (GetEnv('COMSPEC'), Command);
RetVal := DosExitCode;
Result := DosExitCode;
{$ENDIF}
{$IFDEF UNIX}
@ -315,7 +307,6 @@ Begin
{$ENDIF}
Session.TimeOut := TimerSeconds;
ShellDOS := RetVal;
End;
{$IFNDEF UNIX}

View File

@ -436,7 +436,7 @@ Begin
If ExportFileList(NewFiles, False) Then Begin
If Session.io.GetYN (Session.GetPrompt(227), True) Then Begin
FileName := FileName + Session.User.ThisUser.Archive;
ExecuteArchive (Session.TempPath + FileName, Session.User.ThisUser.Archive, Session.TempPath + FileMask, 1);
ExecuteArchive (Session.TempPath + FileName, Session.User.ThisUser.Archive, Session.TempPath + '*', 1);
End Else
FileName := FileName + 'txt';
@ -3386,7 +3386,7 @@ Var
Assign (FDirFile, Config.DataPath + FBase.FileName + '.dir');
FindFirst(FBase.Path + FileMask, Archive, DirInfo);
FindFirst(FBase.Path + '*', Archive, DirInfo);
While DosError = 0 Do Begin
OldPos := FilePos(FBaseFile);

View File

@ -3114,7 +3114,7 @@ Var
Chunks : SmallInt;
Begin
If Session.LocalMode Then
Session.FileBase.ExecuteArchive (Config.QWKPath + Config.qwkBBSID + '.rep', Session.User.ThisUser.Archive, FileMask{TempPath}, 2)
Session.FileBase.ExecuteArchive (Config.QWKPath + Config.qwkBBSID + '.rep', Session.User.ThisUser.Archive, '*', 2)
Else Begin
If Session.FileBase.SelectProtocol(False) = 'Q' Then Exit;
@ -3126,7 +3126,7 @@ Begin
Exit;
End;
Session.FileBase.ExecuteArchive (Session.TempPath + Config.qwkBBSID + '.rep', Session.User.ThisUser.Archive, FileMask, 2)
Session.FileBase.ExecuteArchive (Session.TempPath + Config.qwkBBSID + '.rep', Session.User.ThisUser.Archive, '*', 2)
End;
Assign (DataFile, Session.TempPath + Config.qwkBBSID + '.msg');
@ -3286,10 +3286,10 @@ Begin
If FileExist(Config.QwkGoodbye) Then FileCopy(Config.qwkGoodbye, Session.TempPath + JustFile(Config.qwkGoodbye));
If Session.LocalMode Then Begin
Session.FileBase.ExecuteArchive (Config.QWKPath + Temp, Session.User.ThisUser.Archive, Session.TempPath + FileMask, 1);
Session.FileBase.ExecuteArchive (Config.QWKPath + Temp, Session.User.ThisUser.Archive, Session.TempPath + '*', 1);
Session.io.OutFullLn (Session.GetPrompt(235));
End Else Begin
Session.FileBase.ExecuteArchive (Session.TempPath + Temp, Session.User.ThisUser.Archive, Session.TempPath + FileMask, 1);
Session.FileBase.ExecuteArchive (Session.TempPath + Temp, Session.User.ThisUser.Archive, Session.TempPath + '*', 1);
Session.FileBase.SendFile (Session.TempPath + Temp);
End;