Re: :del and symlinks

Tim Hemel <[email protected]> Mon, 27 Sep 2004 11:58:26 +0200
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
On Fri, 2004-09-17 at 20:37, Bram Moolenaar wrote:
> Tim Hemel wrote:
> 
> > I have experienced a problem with symlinks with aap 1.068.
> > 
> > If i use :del {r}{f} dir  and dir contains a symlink that points to
> > a non-existing file, aap complains and stops.
> 
> I cannot reproduce this.  For me Aap deletes the directory and
> everything in it.
> 
> > I do not know what happens when it contains a link that points to its
> > parent, creating an endless loop.
> 
> I did a simple test and it simply didn't delete the link pointing
> upwards.  It runs into some limit and then breaks out of the loop.
> Detecting a symlink loop is quite difficult...

I did some more research and I found the real problem. The directory
that I am trying to delete contains a symlink to /tmp, which contains
file that are owned by the root user. The aap log file says that it
tried to remove those files:

note:   Could not delete "mydir"[Errno 1] Operation not permitted:
'mydir/xyz/abc/mapping-root'

It turns out that mydir/xyz/abc is a symlink to /tmp and the
mapping-root file is owned by root.

I do not like the idea of aap following these symlinks to delete my
files in /tmp (because I assume that those were deleted now.. :( )


Tim




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php