mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
UPD: Support max depth in Copy/Move operations when template used.
This commit is contained in:
parent
7e75befa6a
commit
bd838bc749
2 changed files with 10 additions and 2 deletions
|
|
@ -442,7 +442,6 @@ begin
|
|||
edtFindPathStart.Visible := False;
|
||||
cbFollowSymLinks.Visible := False;
|
||||
cbPartialNameSearch.Visible := False;
|
||||
cmbSearchDepth.Enabled := False;
|
||||
btnStart.Visible := False;
|
||||
btnStop.Visible := False;
|
||||
btnNewSearch.Visible := False;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ type
|
|||
private
|
||||
FFilesTree: TFileTree;
|
||||
FFilesCount: Int64;
|
||||
FCurrentDepth: Integer;
|
||||
FDirectoriesCount: Int64;
|
||||
FFilesSize: Int64;
|
||||
FExcludeRootDir: Boolean;
|
||||
|
|
@ -358,6 +359,7 @@ begin
|
|||
FFilesSize := 0;
|
||||
FFilesCount := 0;
|
||||
FDirectoriesCount := 0;
|
||||
FCurrentDepth := 0;
|
||||
FRootDir := Files.Path;
|
||||
|
||||
if Assigned(FFileTemplate) then
|
||||
|
|
@ -456,7 +458,14 @@ begin
|
|||
|
||||
if FRecursive then
|
||||
begin
|
||||
AddFilesInDirectory(aFile.FullPath + DirectorySeparator, AddedNode);
|
||||
if not Assigned(FFileTemplate) or
|
||||
(FFileTemplate.SearchRecord.SearchDepth < 0) or
|
||||
(FCurrentDepth <= FFileTemplate.SearchRecord.SearchDepth) then
|
||||
begin
|
||||
Inc(FCurrentDepth);
|
||||
AddFilesInDirectory(aFile.FullPath + DirectorySeparator, AddedNode);
|
||||
Dec(FCurrentDepth);
|
||||
end;
|
||||
|
||||
if Assigned(FFileTemplate) and FExcludeEmptyTemplateDirectories and
|
||||
(AddedNode.SubNodesCount = 0) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue