FIX: Bug [2902833]

This commit is contained in:
Alexander Koblov 2009-11-24 10:07:53 +00:00
commit a826da7dcc
3 changed files with 13 additions and 5 deletions

View file

@ -2,7 +2,8 @@ unit WfxPlugin; {Plugin definitions version 1.5}
interface
uses SysUtils {$IFDEF MSWINDOWS}, Windows{$ENDIF};
uses
SysUtils {$IFDEF MSWINDOWS}, Windows{$ENDIF};
{ ids for FsGetFile }
@ -166,6 +167,13 @@ const FS_BITMAP_NONE=0;
FS_CRYPTOPT_MASTERPASS_SET=1; {The user already has a master password defined}
type
{ Unsigned integer with pointer size }
THandle = {$IFDEF CPU64}QWord{$ELSE}LongWord{$ENDIF};
const
hInvalidHandle: THandle = THandle(-1);
{ Some Windows specific stuff }
const

View file

@ -443,7 +443,7 @@ procedure TWfxPluginFileSource.FillAndCount(Files: TFiles; out NewFiles: TFiles;
with FWfxModule do
begin
Handle := WfxFindFirst(srcPath, FindData);
if Handle = feInvalidHandle then Exit;
if Handle = hInvalidHandle then Exit;
repeat
if (FindData.FileName = '.') or (FindData.FileName = '..') then Continue;

View file

@ -249,14 +249,14 @@ begin
begin
FillChar(FindDataW, SizeOf(FindDataW), 0);
Result:= FsFindFirstW(PWideChar(UTF8Decode(Path)), FindDataW);
if Result <> feInvalidHandle then
if Result <> hInvalidHandle then
FindData:= LoadWfxFindData(FindDataW);
end
else if Assigned(FsFindFirst) then
begin
FillChar(FindDataA, SizeOf(FindDataA), 0);
Result:= FsFindFirst(PAnsiChar(UTF8ToSys(Path)), FindDataA);
if Result <> feInvalidHandle then
if Result <> hInvalidHandle then
FindData:= LoadWfxFindData(FindDataA);
end;
end;
@ -610,7 +610,7 @@ begin
Include(Result, VFS_CAPS_MKDIR);
end;
function TWFXModule.VFSConfigure(Parent: System.THandle): Boolean;
function TWFXModule.VFSConfigure(Parent: THandle): Boolean;
var
RemoteName: UTF8String;
begin