diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 15:03:54 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 15:03:54 +0000 |
commit | 54d99d9a8a00deef299dbc9fb34a06e4ca6bfe42 (patch) | |
tree | 030ba46054e7b42cdf1646eeff8b7b3213ad7565 /unicode/src/base/UPlatformLinux.pas | |
parent | 6e563f3fafe4e741370701adf19b1ee9eccafbeb (diff) | |
download | usdx-54d99d9a8a00deef299dbc9fb34a06e4ca6bfe42.tar.gz usdx-54d99d9a8a00deef299dbc9fb34a06e4ca6bfe42.tar.xz usdx-54d99d9a8a00deef299dbc9fb34a06e4ca6bfe42.zip |
DirectoryFindFiles unified for mac+unix
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1862 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | unicode/src/base/UPlatformLinux.pas | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/unicode/src/base/UPlatformLinux.pas b/unicode/src/base/UPlatformLinux.pas index 30499a97..7efeb963 100644 --- a/unicode/src/base/UPlatformLinux.pas +++ b/unicode/src/base/UPlatformLinux.pas @@ -102,24 +102,23 @@ var i: Integer; TheDir : pDir; ADirent : pDirent; - Entry : Longint; lAttrib : integer; begin i := 0; Filter := LowerCase(Filter); - TheDir := FpOpenDir( Dir ); + TheDir := FpOpenDir(Dir); if Assigned(TheDir) then begin repeat - ADirent := FpReadDir(TheDir^); + ADirent := FpReadDir(TheDir^); if Assigned(ADirent) and (ADirent^.d_name <> '.') and (ADirent^.d_name <> '..') then begin lAttrib := FileGetAttr(Dir + ADirent^.d_name); if ReturnAllSubDirs and ((lAttrib and faDirectory) <> 0) then begin - SetLength( Result, i + 1); + SetLength(Result, i + 1); Result[i].Name := ADirent^.d_name; Result[i].IsDirectory := true; Result[i].IsFile := false; @@ -127,7 +126,7 @@ begin end else if (Length(Filter) = 0) or (Pos( Filter, LowerCase(ADirent^.d_name)) > 0) then begin - SetLength( Result, i + 1); + SetLength(Result, i + 1); Result[i].Name := ADirent^.d_name; Result[i].IsDirectory := false; Result[i].IsFile := true; |