mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 15:50:36 +02:00
* switched the fv units to objfpc mode
git-svn-id: branches/unicodekvm@48549 -
This commit is contained in:
parent
92c96da226
commit
4b0edb6115
@ -175,7 +175,7 @@ FOR FPC THESE ARE THE TRANSLATIONS
|
||||
{ FPC 64 BIT COMPILER added - Update 28Nov2010 PM }
|
||||
{---------------------------------------------------------------------------}
|
||||
{$IFDEF FPC}
|
||||
{$mode fpc}
|
||||
{$mode objfpc}
|
||||
|
||||
{$UNDEF PROC_Real}
|
||||
{$DEFINE PROC_Protected}
|
||||
|
@ -2485,31 +2485,29 @@ end;
|
||||
function IsDir(const S: String): Boolean;
|
||||
var
|
||||
SR: SearchRec;
|
||||
Is: boolean;
|
||||
begin
|
||||
Is:=false;
|
||||
Result:=false;
|
||||
{$ifdef Unix}
|
||||
Is:=(S=DirSeparator); { handle root }
|
||||
Result:=(S=DirSeparator); { handle root }
|
||||
{$else}
|
||||
{$ifdef HASAMIGA}
|
||||
Is := (Length(S) > 0) and (S[Length(S)] = DriveSeparator);
|
||||
Result := (Length(S) > 0) and (S[Length(S)] = DriveSeparator);
|
||||
{$else}
|
||||
Is:=(length(S)=3) and (Upcase(S[1]) in['A'..'Z']) and (S[2]=':') and (S[3]=DirSeparator);
|
||||
Result:=(length(S)=3) and (Upcase(S[1]) in['A'..'Z']) and (S[2]=':') and (S[3]=DirSeparator);
|
||||
{$endif}
|
||||
{ handle root dirs }
|
||||
{$endif}
|
||||
if Is=false then
|
||||
if Result=false then
|
||||
begin
|
||||
FindFirst(S, Directory, SR);
|
||||
if DosError = 0 then
|
||||
Is := (SR.Attr and Directory) <> 0
|
||||
Result := (SR.Attr and Directory) <> 0
|
||||
else
|
||||
Is := False;
|
||||
Result := False;
|
||||
{$ifdef fpc}
|
||||
FindClose(SR);
|
||||
{$endif}
|
||||
end;
|
||||
IsDir:=Is;
|
||||
end;
|
||||
|
||||
{****************************************************************************}
|
||||
|
Loading…
Reference in New Issue
Block a user