lazutils: FileIsInPath: use ResolveDots instead of TrimFilename

git-svn-id: trunk@44835 -
This commit is contained in:
mattias 2014-04-28 14:30:33 +00:00
parent cda481e98c
commit 22443c165c
2 changed files with 5 additions and 5 deletions

View File

@ -642,8 +642,8 @@ begin
Result:=false;
exit;
end;
ExpFile:=TrimFilename(Filename);
ExpPath:=AppendPathDelim(TrimFilename(Path));
ExpFile:=ResolveDots(Filename);
ExpPath:=AppendPathDelim(ResolveDots(Path));
l:=length(ExpPath);
Result:=(l>0) and (length(ExpFile)>l) and (ExpFile[l]=PathDelim)
and (CompareFilenames(ExpPath,LeftStr(ExpFile,l))=0);

View File

@ -562,9 +562,9 @@ as needed by Windows file names like D:test.
<!-- function Visibility: default -->
<element name="FileIsInPath">
<short/>
<descr>
</descr>
<short>Returns true if Filename is below Path</short>
<descr>Path is a directory, Filename a file or directory. Returns true if Filename is a file or directory somewhere below Path. This is a logical test, so it does not check symlinks.
For example under Unix the Filename '/usr/lib/fpc' is below Path '/usr/lib', '/usr' and '/'.</descr>
<errors>
</errors>
<seealso>