Fix path normalization for the case of CWD being the root directory (/).
commit45f104b60356b096deaed0fd184f1c8b04a40d75
authorJürgen Bubeck <bubeck@xkrug.com>
Wed, 9 Nov 2016 16:14:42 +0000 (9 17:14 +0100)
committerPrzemyslaw Pawelczyk <przemoc@gmail.com>
Wed, 7 Apr 2021 16:24:27 +0000 (7 18:24 +0200)
tree555fa7bfd9040d12cec549f52cc2508ebd2ee03a
parentf8d5fc70290d19441ea513a10dbfe8cc074571f7
Fix path normalization for the case of CWD being the root directory (/).

Previously metastore would fail if running from / and paths were given:

    $ pwd
    /
    $ metastore -d bin
    lstat failed for .bin: No such file or directory

Now it works properly:

    $ metastore -d bin | head -1
    lrwxrwxrwx      root    root    2018-08-17 16:31:23.120322532 +0200     ./bin/hostname

Signed-off-by: Przemyslaw Pawelczyk <przemoc@gmail.com>
src/metaentry.c