mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: If template has IsNotOlderThan option then recalculate date/time file checks before checking because it depends on current time.
This commit is contained in:
parent
53839bac0e
commit
08ddd1447d
2 changed files with 6 additions and 0 deletions
|
|
@ -92,6 +92,8 @@ type
|
|||
|
||||
procedure SearchTemplateToFindFileChecks(const SearchTemplate: TSearchTemplateRec;
|
||||
out FileChecks: TFindFileChecks);
|
||||
procedure DateTimeOptionsToChecks(const SearchTemplate: TSearchTemplateRec;
|
||||
var FileChecks: TFindFileChecks);
|
||||
|
||||
function CheckDirectoryName(const FileChecks: TFindFileChecks; const DirectoryName: String) : Boolean;
|
||||
function CheckDirectoryNameRelative(const FileChecks: TFindFileChecks; const FullPath, BasePath: String) : Boolean;
|
||||
|
|
|
|||
|
|
@ -102,6 +102,10 @@ end;
|
|||
|
||||
function TSearchTemplate.CheckFile(const AFile: TFile): Boolean;
|
||||
begin
|
||||
// If template has IsNotOlderThan option then DateTime checks must be recalculated
|
||||
// everytime because they depend on current time.
|
||||
if FSearchRecord.IsNotOlderThan then
|
||||
DateTimeOptionsToChecks(FSearchRecord, FFileChecks);
|
||||
Result := uFindFiles.CheckFile(FSearchRecord, FFileChecks, AFile);
|
||||
end;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue