mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 10:59:29 +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));
|
||||
// Don't even try to copy to a subdirectory of SourceDir.
|
||||
if {$if defined(Windows) or defined(darwin)}AnsiStartsText{$ELSE}AnsiStartsStr{$ENDIF}
|
||||
(SourceDir, TargetDir) then Exit;
|
||||
(Searcher.FSourceDir, Searcher.FTargetDir) then Exit;
|
||||
Searcher.Search(SourceDir);
|
||||
Result:=True;
|
||||
finally
|
||||
Result:=Searcher.FCopyFailedCount=0;
|
||||
finally
|
||||
Searcher.Free;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user