[bug #20522] Issues with --retr-symlinks and timestamps

mattiadb271 <[email protected]> Sat, 3 May 2025 11:51:26 -0400 (EDT)
Newsgroups gmane.comp.web.wget.general
Message-ID <[email protected]>
--8323329-1277503392-1746287486=:3254856
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline

Follow-up Comment #1, bug #20522 (group wget):=0A=0AI had a look at this an=
d it seems it is due to a limitation of FTP, and=0Aperhaps quite impractica=
l to implement.=0A=0AFiles are discovered by listing contents of a director=
y and parsing the=0Aoutput. Therefore, we can only get the path of a symlin=
k's target by parsing=0A`ls' output.=0A=0ASome FTP servers server provide a=
 MDTM command which returns the timestamp of=0Aa file given its path:=0Ahtt=
ps://www.solarwinds.com/serv-u/tutorials/mdtm-mkd-mode-noop-sscn-xcrc-ftp-c=
ommand=0A=0AThis is however not always available.=0A=0ATo provide support f=
or resolving the timestamp of the target of a symlink, I=0Asee 2 ways off t=
he top of my head:=0A=0A* maintain a data structure to=0A=09* populate give=
n the paths of all files to download=0A=09* traverse to link symlinks to th=
eir file nodes=0A=09* traverse again to download=0A=0A* or, for each symlin=
k encountered=0A=09* cd into the directory of the linked to file=0A=09* lis=
t contents again=0A=09* parse the contents again and compare file by file t=
o find the target file=0A=0AWhile the latter might be okay for one file, - =
although I would argue, not a=0Avery clean solution - it has the potential =
to explode in computational=0Acomplexity once we do a recursive download wi=
th many symlinks.=0A=0AI don't know what is being done about this in V2, bu=
t perhaps the best way to=0Acircumvent this is to use --retr-symlinks=3Dno.=
 This will download symlinks=0Anormal files.=0A=0AAs long as the source is =
trusted, the security concerns of having dangling=0Asymlinks that resolve t=
o outside the local mirror might not be a practical=0Aconcern.=0A=0A=0A    =
_______________________________________________________=0A=0AReply to this =
item at:=0A=0A  <https://savannah.gnu.org/bugs/?20522>=0A=0A_______________=
________________________________=0AMessage sent via Savannah=0Ahttps://sava=
nnah.gnu.org/=0A
--8323329-1277503392-1746287486=:3254856
Content-Type: APPLICATION/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaBY7fgAKCRCqLAuaBUf3
TjWMAPsGUEA1OD1qAJBRcj0LGhlO4+sc88PtU8ALsRdbv58hUgEAqsC2rVDykHIm
eeZ77aniUkniE3uluFUleilbpy6jxgM=
=cvHv
-----END PGP SIGNATURE-----

--8323329-1277503392-1746287486=:3254856--