[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
wget2 | Directory prefix provided with -P/--directory-prefix is not norm
From: |
Rudolf Streif (@rudolf.streif) |
Subject: |
wget2 | Directory prefix provided with -P/--directory-prefix is not normalized correctly (#667) |
Date: |
Thu, 06 Jun 2024 01:53:41 +0000 |
Rudolf Streif created an issue: https://gitlab.com/gnuwget/wget2/-/issues/667
If a directory prefix is provided its path components are not normalized
correctly, which in turn causes the function mkdir_path to fail. Examples:
-P ./downloads works
-P ../downloads works
-P ../../downloads does not work (Internal error: Unexpected relative path:
'../..')
-P ./../downloads does not work (Internal error: Unexpected relative path:
'./..')
-P /home/user/downloads/../downloads does not work (Internal error: Unexpected
relative path: '/home/user/downloads/..')
I would not expect, nor actually want, mkdir_path to create the path components
of the directory prefix (only the patch components from a recursively
downloaded directory tree).
IMHO, wget2 should use realpath (or equivalent) to obtain the canonicalized
absolute path name, then check if the path exists, and if so, use it
subsequently. If the path does not exist or is actually a file then it should
abort.
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/wget2/-/issues/667
You're receiving this email because of your account on gitlab.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- wget2 | Directory prefix provided with -P/--directory-prefix is not normalized correctly (#667),
Rudolf Streif (@rudolf.streif) <=