ExecuteArchive is no longer case sensitive during extention checking

This commit is contained in:
mysticbbs 2012-02-24 09:31:16 -05:00
parent 2cdb407290
commit cb53e34e2d
2 changed files with 13 additions and 5 deletions

View File

@ -975,7 +975,7 @@ Begin
'L' : Temp := 'LZH';
'R' : Temp := 'RAR';
'Z' : Temp := 'ZIP';
'?' : Temp := strUpper(Copy(FName, Succ(Pos('.', FName)), Length(FName))); //get ext function
'?' : Temp := strUpper(JustFileExt(FName));
End;
Reset (ArcFile);
@ -985,9 +985,12 @@ Begin
Close (ArcFile);
Exit;
End;
Read (ArcFile, Arc);
If (Not Arc.Active) or (Arc.OSType <> OSType) Then Continue;
If Arc.Ext = Temp Then Break;
If strUpper(Arc.Ext) = Temp Then Break;
Until False;
Close (ArcFile);

View File

@ -79,6 +79,8 @@ Type
Function ShellDOS (ExecPath: String; Command: String) : LongInt;
Begin
// needs to save/restore screen
If ExecPath <> '' Then DirChange(ExecPath);
{$IFDEF UNIX}
@ -104,9 +106,12 @@ Var
ArcFile : File of RecArchive;
Arc : RecArchive;
Begin
Temp := JustFileExt(FName);
Temp := strUpper(JustFileExt(FName));
Reset (ArcFile);
Assign (ArcFile, Config.DataPath + 'archive.dat');
{$I-} Reset (ArcFile); {$I+}
If IoResult <> 0 Then Exit;
Repeat
If Eof(ArcFile) Then Begin
@ -118,7 +123,7 @@ Begin
If (Not Arc.Active) or (Arc.OSType <> OSType) Then Continue;
If Arc.Ext = Temp Then Break;
If strUpper(Arc.Ext) = Temp Then Break;
Until False;
Close (ArcFile);