createAbsolutePath is not able to resolve '/somedir/..' to '/'
Summary
createAbsolutePath is not able to resolve (e.g) '/tmp/..' to '/' it returns '.' instead... which is of course incorrect.
System Information
- Operating system:
- Processor architecture:
- Compiler version:
- Device:
Linux : Opensuse 15.5
kernel :
uname -r
5.14.21-150500.55.39-default
= fpc -v Free Pascal Compiler version 3.2.2 [2023/05/17] for x86_64 Copyright (c) 1993-2021 by Florian Klaempfl and others
lazarus : version 2.2.6 of 2023-12-19
Steps to reproduce
newdir:=createAbsolutePath('/tmp/..','/tmp' ); writeln('newdir is now : '+newdir); // prints '.'
What is the current bug behavior?
It does not return the absolute path of '/tmp/..' i.e. '/' but '.'
What is the expected (correct) behavior?
it should return '/'
Relevant logs and/or screenshots
Possible fixes
I tried, but I am not sure why it does this or which checking code is responsible for this behaviour.