download/git: fix transform-name
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 7 Apr 2018 21:26:14 +0000 (23:26 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 8 Apr 2018 15:40:16 +0000 (17:40 +0200)
commit54785851eeb775720aac8a0b6b423fda26ac8f27
treec52d68b0804443a10745df30f17ef4ad81f6e304
parentd3a8177e175e035ca3b19dca7868859f7cb238a1
download/git: fix transform-name

When a package contains a relative symlink which first component is '..'
(thus pointing one directory higher), for example package 'meh' contains
this symlink:

    foo/bar -> ../buz

then it would be stored as 'meh-version./buz' because of the
transform-name pattern replacement.

Fix it to only match the leading './'.

Reported-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
support/download/git