diff options
Diffstat (limited to '')
-rw-r--r-- | unicode/src/base/UCommon.pas | 1 | ||||
-rw-r--r-- | unicode/src/base/UPlatformLinux.pas | 9 | ||||
-rw-r--r-- | unicode/src/base/UPlatformMacOSX.pas | 11 |
3 files changed, 12 insertions, 9 deletions
diff --git a/unicode/src/base/UCommon.pas b/unicode/src/base/UCommon.pas index 3230a065..d7c36196 100644 --- a/unicode/src/base/UCommon.pas +++ b/unicode/src/base/UCommon.pas @@ -225,6 +225,7 @@ end; {$ENDIF} +{ TODO: REMOVE } // Checks if a regular files or directory with the given name exists. // The comparison is case insensitive. function FileExistsInsensitive(var FileName: string): boolean; 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; diff --git a/unicode/src/base/UPlatformMacOSX.pas b/unicode/src/base/UPlatformMacOSX.pas index 96e4bc63..08ad247d 100644 --- a/unicode/src/base/UPlatformMacOSX.pas +++ b/unicode/src/base/UPlatformMacOSX.pas @@ -288,6 +288,7 @@ begin Result := GetApplicationSupportPath; end; +{ TODO: REMOVE } function TPlatformMacOSX.DirectoryFindFiles(Dir, Filter: WideString; ReturnAllSubDirs: boolean): TDirectoryEntryArray; var i : integer; @@ -298,10 +299,11 @@ 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 @@ -323,9 +325,10 @@ begin i := i + 1; end; end; - until ADirent = nil; + until (ADirent = nil); - FPCloseDir(TheDir); + FpCloseDir(TheDir^); + end; end; end. |