Skip to content

Commit

Permalink
Cosmetics (not important)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdp committed Jun 16, 2022
1 parent 4e72ba1 commit 32058c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Base/JPL.Files.pas
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,13 @@ function AddUncPrefix(const FileOrDirectoryName: string): string;
function DirectoryExistsEx(const Dir: string; AcceptSymLinks: Boolean = True): Boolean;
var
SR: SysUtils.TSearchRec;

{$WARN SYMBOL_PLATFORM OFF}
function IsDirectory: Boolean;
begin
Result := ( (SR.Attr and faDirectory) <> 0 ) and (SR.Name <> '.') and (SR.Name <> '..');
if Result and (not AcceptSymLinks) then Result := ( Result and ( (SR.Attr and faSymLink) = 0) );
end;
{$WARN SYMBOL_PLATFORM ON}

begin
Result := False;
Expand All @@ -192,7 +193,7 @@ function GetFiles(const Directory: string; SearchPattern: string = '*'; RecurseD
sl: TStringList;
i: integer;
begin
SetLength(Result, 0);
SetLength(Result{%H-}, 0);
sl := TStringList.Create;
try
JPGetFileList(SearchPattern, Directory, sl, RecurseDepth, AcceptSymLinks, AcceptSymLinks, nil, nil, nil);
Expand All @@ -212,7 +213,7 @@ function GetDirectories(const StartDir: string; RecurseDepth: Word = 0; AcceptSy
sl: TStringList;
i: integer;
begin
SetLength(Result, 0);
SetLength(Result{%H-}, 0);
sl := TStringList.Create;
try
JPGetDirectoryList(StartDir, sl, AcceptSymLinks, RecurseDepth, nil);
Expand Down
4 changes: 2 additions & 2 deletions Base/JPL.JsonHelpers.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
Last mod: 2022.05
}

{$I .\..\jp.inc}

{$IFNDEF FPC}
This unit is for FPC only!
{$ENDIF}

{$I .\..\jp.inc}

{$mode objfpc}{$H+}

interface
Expand Down

0 comments on commit 32058c1

Please sign in to comment.