Re: /bin/cp: overwrite symlink with file pointed to by symlink

2021-02-22 Thread Quentin Rameau
> Hi Quentin, Hi Cristopher, > Thank you for having a look. You're welcome! > I know I'm very late, but I still like your patch. So ok chrisz@ if you > want to commit it. It didn't raise much passion at the time, we can just hope it gets a bit more attention now!

Re: /bin/cp: overwrite symlink with file pointed to by symlink

2021-02-11 Thread Christopher Zimmermann
Hi Quentin, Thank you for having a look. I know I'm very late, but I still like your patch. So ok chrisz@ if you want to commit it. Christopher On Fri, Nov 01, 2019 at 08:46:51PM +0100, Quentin Rameau wrote: If you're interested in adapting to POSIX, here's a proposition patch: Index:

Re: /bin/cp: overwrite symlink with file pointed to by symlink

2019-11-15 Thread Quentin Rameau
Hello, > > Now I had a look at our cp.c, our cp(1) and at POSIX: > > > > -f For each existing destination pathname, remove it and > > create a new file, without prompting for confirmation, regardless of > > its permissions. The -f option overrides any previous -i options. > > > > POSIX says

Re: /bin/cp: overwrite symlink with file pointed to by symlink

2019-11-01 Thread Quentin Rameau
> Hi, Hello Christopher, > I admit this is a very special case, but anyway this is what I hit: > > $ touch blub; ln -s blub blab; ls -l; cp -f blub blab > total 0 > lrwxr-xr-x 1 madroach wheel 4 Oct 30 17:39 blab -> blub > -rw-r--r-- 1 madroach wheel 0 Oct 30 17:39 blub > cp: blab and

/bin/cp: overwrite symlink with file pointed to by symlink

2019-10-30 Thread Christopher Zimmermann
Hi, I admit this is a very special case, but anyway this is what I hit: $ touch blub; ln -s blub blab; ls -l; cp -f blub blab total 0 lrwxr-xr-x 1 madroach wheel 4 Oct 30 17:39 blab -> blub -rw-r--r-- 1 madroach wheel 0 Oct 30 17:39 blub cp: blab and blub are identical (not copied). Now