mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 19:59:14 +02:00
LazUtils: Use trimmed paths for comparing sub-dir in CopyDirTree. Fix return value. Issue #28841.
git-svn-id: trunk@51034 -
This commit is contained in:
parent
6faa4e893c
commit
d10faafb1a
@ -708,11 +708,10 @@ begin
|
|||||||
Searcher.FTargetDir:=TrimFilename(SetDirSeparators(TargetDir));
|
Searcher.FTargetDir:=TrimFilename(SetDirSeparators(TargetDir));
|
||||||
// Don't even try to copy to a subdirectory of SourceDir.
|
// Don't even try to copy to a subdirectory of SourceDir.
|
||||||
if {$if defined(Windows) or defined(darwin)}AnsiStartsText{$ELSE}AnsiStartsStr{$ENDIF}
|
if {$if defined(Windows) or defined(darwin)}AnsiStartsText{$ELSE}AnsiStartsStr{$ENDIF}
|
||||||
(SourceDir, TargetDir) then Exit;
|
(Searcher.FSourceDir, Searcher.FTargetDir) then Exit;
|
||||||
Searcher.Search(SourceDir);
|
Searcher.Search(SourceDir);
|
||||||
Result:=True;
|
|
||||||
finally
|
|
||||||
Result:=Searcher.FCopyFailedCount=0;
|
Result:=Searcher.FCopyFailedCount=0;
|
||||||
|
finally
|
||||||
Searcher.Free;
|
Searcher.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user