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; Result:=false;
exit; exit;
end; end;
ExpFile:=TrimFilename(Filename); ExpFile:=ResolveDots(Filename);
ExpPath:=AppendPathDelim(TrimFilename(Path)); ExpPath:=AppendPathDelim(ResolveDots(Path));
l:=length(ExpPath); l:=length(ExpPath);
Result:=(l>0) and (length(ExpFile)>l) and (ExpFile[l]=PathDelim) Result:=(l>0) and (length(ExpFile)>l) and (ExpFile[l]=PathDelim)
and (CompareFilenames(ExpPath,LeftStr(ExpFile,l))=0); 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 --> <!-- function Visibility: default -->
<element name="FileIsInPath"> <element name="FileIsInPath">
<short/> <short>Returns true if Filename is below Path</short>
<descr> <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.
</descr> For example under Unix the Filename '/usr/lib/fpc' is below Path '/usr/lib', '/usr' and '/'.</descr>
<errors> <errors>
</errors> </errors>
<seealso> <seealso>