Another thing related to CreateRelativePath:

  RelPath:=CreateRelativePath(FileName, BasePath);

Now, when
  BasePath is '/TopDir/Tests/MyProj/'
and
  FileName is '/TopDir/Tests/MyProj/src/MyUnit.pas'
then
  RelPath = 'src/MyUnit.pas'
which is correct.

However if the BasePath is longer (deeper) than FileName's path, it doesn't 
work. For example, when
  BasePath is '/TopDir/Tests/MyProj/src/'
and
  FileName is '/TopDir/Tests/MyProj/MyFile.cfg'
then I want to have
  RelPath = '../MyFile.cfg'  ( <-- note ../ )
but it doesn't happen.

Is there such a function hidden somewhere in FPC/Lazarus vast amount of code?
If not, then CreateRelativePath should be fixed.


Regards,
Juha Manninen

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to