diff --git a/Vfs.dproj b/Vfs.dproj index 2de826e..e6e9842 100644 --- a/Vfs.dproj +++ b/Vfs.dproj @@ -30,11 +30,7 @@ Delphi.Personality VCLApplication -FalseTrueFalseTrueTrue1020FalseFalseFalseFalseFalse10491251Alexander Shostak (aka EtherniDee)Virtual File System1.0.2.01.0.0.0Vfs.dpr - - - - +FalseTrueFalseTrueTrue1024FalseFalseFalseFalseFalse10491251Alexander Shostak (aka EtherniDee)Virtual File System1.0.2.41.0.0.0Vfs.dpr Microsoft Office 2000 Sample Automation Server Wrapper Components diff --git a/Vfs.res b/Vfs.res index 44bbf33..43bf048 100644 Binary files a/Vfs.res and b/Vfs.res differ diff --git a/VfsBase.pas b/VfsBase.pas index a922ffc..5de8b1c 100644 --- a/VfsBase.pas +++ b/VfsBase.pas @@ -577,7 +577,7 @@ begin with SysScanDir(AbsRealPath, '*') do begin while IterNext(FileInfo.FileName, @FileInfo.Base) do begin - if Utils.HasFlag(Windows.FILE_ATTRIBUTE_DIRECTORY, FileInfo.Base.FileAttributes) then begin + if Utils.Flags(FileInfo.Base.FileAttributes).Have(Windows.FILE_ATTRIBUTE_DIRECTORY) then begin if (FileInfo.FileName <> '.') and (FileInfo.FileName <> '..') then begin Subdirs.Add(TFileInfo.Create(@FileInfo)); end; diff --git a/VfsControl.pas b/VfsControl.pas index 6b83f5d..7e98eb7 100644 --- a/VfsControl.pas +++ b/VfsControl.pas @@ -149,8 +149,8 @@ begin AbsRootDir := VfsUtils.NormalizePath(RootDir); AbsModsDir := VfsUtils.NormalizePath(ModsDir); result := (AbsRootDir <> '') and (AbsModsDir <> '') and - VfsUtils.GetFileInfo(AbsRootDir, FileInfo) and Utils.HasFlag(Windows.FILE_ATTRIBUTE_DIRECTORY, FileInfo.Base.FileAttributes) and - VfsUtils.GetFileInfo(AbsModsDir, FileInfo) and Utils.HasFlag(Windows.FILE_ATTRIBUTE_DIRECTORY, FileInfo.Base.FileAttributes); + VfsUtils.GetFileInfo(AbsRootDir, FileInfo) and Utils.Flags(FileInfo.Base.FileAttributes).Have(Windows.FILE_ATTRIBUTE_DIRECTORY) and + VfsUtils.GetFileInfo(AbsModsDir, FileInfo) and Utils.Flags(FileInfo.Base.FileAttributes).Have(Windows.FILE_ATTRIBUTE_DIRECTORY); if result then begin ModPathPrefix := VfsUtils.AddBackslash(AbsModsDir); diff --git a/VfsHooks.pas b/VfsHooks.pas index 44a8a66..2c47110 100644 --- a/VfsHooks.pas +++ b/VfsHooks.pas @@ -111,7 +111,7 @@ begin // Return cached VFS file info if RedirectedPath <> '' then begin - if not HadTrailingDelim or Utils.HasFlag(FILE_ATTRIBUTE_DIRECTORY, FileInfo.Base.FileAttributes) then begin + if not HadTrailingDelim or Utils.Flags(FileInfo.Base.FileAttributes).Have(FILE_ATTRIBUTE_DIRECTORY) then begin FileInformation.CreationTime := FileInfo.Base.CreationTime; FileInformation.LastAccessTime := FileInfo.Base.LastAccessTime; FileInformation.LastWriteTime := FileInfo.Base.LastWriteTime; @@ -171,7 +171,7 @@ begin // Return cached VFS file info if RedirectedPath <> '' then begin - if not HadTrailingDelim or Utils.HasFlag(FILE_ATTRIBUTE_DIRECTORY, FileInfo.Base.FileAttributes) then begin + if not HadTrailingDelim or Utils.Flags(FileInfo.Base.FileAttributes).Have(FILE_ATTRIBUTE_DIRECTORY) then begin FileInformation.CreationTime := FileInfo.Base.CreationTime; FileInformation.LastAccessTime := FileInfo.Base.LastAccessTime; FileInformation.LastWriteTime := FileInfo.Base.LastWriteTime; diff --git a/VfsUtils.pas b/VfsUtils.pas index fd809e5..c78ff2c 100644 --- a/VfsUtils.pas +++ b/VfsUtils.pas @@ -506,7 +506,7 @@ var FileAttrs: integer; begin - result := GetFileAttrs(Path, FileAttrs) and Utils.HasFlag(Windows.FILE_ATTRIBUTE_DIRECTORY, FileAttrs); + result := GetFileAttrs(Path, FileAttrs) and Utils.Flags(FileAttrs).Have(Windows.FILE_ATTRIBUTE_DIRECTORY); end; function SysOpenFile (const NtAbsPath: WideString; {OUT} var Res: Windows.THandle; const OpenMode: TSysOpenFileMode = OPEN_AS_ANY; const AccessMode: ACCESS_MASK = FILE_GENERIC_READ): boolean;