Now checks current directory before mysticbbs environment variable.
This commit is contained in:
parent
c64481a7ed
commit
e86ed5cc6a
|
@ -81,17 +81,22 @@ Var
|
||||||
FileConfig : TBufFile;
|
FileConfig : TBufFile;
|
||||||
DatLoc : String;
|
DatLoc : String;
|
||||||
Begin
|
Begin
|
||||||
DatLoc := GetEnv('mysticbbs');
|
|
||||||
|
|
||||||
If DatLoc <> '' Then DatLoc := DirSlash(DatLoc);
|
|
||||||
|
|
||||||
FileConfig := TBufFile.Create(SizeOf(RecConfig));
|
FileConfig := TBufFile.Create(SizeOf(RecConfig));
|
||||||
|
|
||||||
If Not FileConfig.Open(DatLoc + 'mystic.dat', fmOpen, fmReadWrite + fmDenyNone, SizeOf(RecConfig)) Then Begin
|
If Not FileConfig.Open('mystic.dat', fmOpen, fmReadWrite + fmDenyNone, SizeOf(RecConfig)) Then Begin
|
||||||
WriteLn;
|
DatLoc := GetEnv('mysticbbs');
|
||||||
WriteLn ('ERROR: Unable to read MYSTIC.DAT. This file must exist in the same');
|
|
||||||
WriteLn ('directory as MIS');
|
If DatLoc <> '' Then DatLoc := DirSlash(DatLoc);
|
||||||
Halt (1);
|
|
||||||
|
If Not FileConfig.Open(DatLoc + 'mystic.dat', fmOpen, fmReadWrite + fmDenyNone, SizeOf(RecConfig)) Then Begin
|
||||||
|
WriteLn;
|
||||||
|
WriteLn ('ERROR: Unable to read MYSTIC.DAT. This file must exist in the same');
|
||||||
|
WriteLn ('directory as MIS');
|
||||||
|
|
||||||
|
FileConfig.Free;
|
||||||
|
|
||||||
|
Halt (1);
|
||||||
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
FileConfig.Read(bbsConfig);
|
FileConfig.Read(bbsConfig);
|
||||||
|
|
Loading…
Reference in New Issue