[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] [bug #45037] wget -O foo ftp://ftp.funet.fi/pub/Linux/mir
From: |
Tim Ruehsen |
Subject: |
Re: [Bug-wget] [bug #45037] wget -O foo ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README deletes README symlink |
Date: |
Thu, 07 May 2015 09:34:14 +0200 |
User-agent: |
KMail/4.14.2 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; ) |
Hi Darshit,
your patch doesn't work as expected.
$ cat abc >xxx
$ ln -s xxx foo
$ ln -s /etc/passwd README
$ ../src/wget -O foo ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README
...
$ ls -la
lrwxrwxrwx 1 oms users 11 May 7 09:28 README -> /etc/passwd
-rw-r--r-- 1 oms users 1495 May 7 09:30 xxx
'foo' doesn't exist and 'xxx' has been overwritten !!!
Regards, Tim
On Thursday 07 May 2015 10:06:55 Darshit Shah wrote:
> >address@hidden:~/tmp/y>ln -s /etc/passwd README
> >address@hidden:~/tmp/y>ls
> >README@
> >address@hidden:~/tmp/y>wget -O foo
> >ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README
> >--2015-05-05 13:17:22-- ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README
> >
> > => ‘foo’
> >
> >Resolving ftp.funet.fi (ftp.funet.fi)... 193.166.3.2, 2001:708:10:9::20:2
> >Connecting to ftp.funet.fi (ftp.funet.fi)|193.166.3.2|:21... connected.
> >Logging in as anonymous ... Logged in!
> >==> SYST ... done. ==> PWD ... done.
> >==> TYPE I ... done. ==> CWD (1) /pub/Linux/mirrors/debian ... done.
> >==> SIZE README ... 1495
> >==> PASV ... done. ==> RETR README ... done.
> >Length: 1495 (1.5K) (unauthoritative)
> >
> >README 100%[=====================>] 1.46K 5.45KB/s in
> >0.3s
> >
> >
> >2015-05-05 13:17:28 (5.45 KB/s) - ‘foo’ saved [1495]
> >
> >address@hidden:~/tmp/y>ls
> >foo
> >
> >Doesn't happen if README is a file rather than a symlink, doesn't happen
> >when using http. The ftp downloader apparently has a bug..
>
> This definitely is a bug. I've attached a small fix for this particular
> issue. If no one has any issues with it, I'll push it in a day.
>
> Although, I think we should also look into the issue Giuseppe found, and
> also the point that Angel raised about compatibility with shell like
> redirection.
signature.asc
Description: This is a digitally signed message part.
Re: [Bug-wget] [bug #45037] wget -O foo ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README deletes README symlink, Darshit Shah, 2015/05/07
- Re: [Bug-wget] [bug #45037] wget -O foo ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README deletes README symlink,
Tim Ruehsen <=