Re: Bug in FileUtils - apathy or bad email

From: "Sean E. Russell" <ser@...>
Date: 2004-04-30 03:58:38 UTC
List: ruby-core #2836
On Thursday 29 April 2004 17:39, Warren Brown wrote:
>     I'm don't have a Ruby installation where I am right now, but it
> looks like you are creating a symbolic link to the nonexistent directory
> "../neighbor" instead of the directory you created "./neighbor".  If so,
> the error message looks correct.

I don't know if your interpretation is correct.  The fact that the link end is 
non-existant shouldn't preclude you from removing it.

Put another way, if I do the same thing in a shell script, I get no errors:

121.162)~/tmp% mkdir fred
121.162)~/tmp% mkdir neighbor
121.162)~/tmp% ln -s ../neighbor fred/upandover
121.162)~/tmp% rm -rf fred
121.162)~/tmp% 

I'd expect Ruby to work the same way, so I'd agree that this is a bug.

By the way, it really shouldn't matter what "neighbor" is.  This should also 
work:

	Dir.mkdir("fred")
	FileUtils.ln_s("/non/existant/directory", "fred/foo" )
	FileUtils.rm_rf( "fred" )   # Should still work

-- 
### SER   
### Deutsch|Esperanto|Francaise|Linux|XML|Java|Ruby|Aikido
### http://www.germane-software.com/~ser  jabber.com:ser  ICQ:83578737 
### GPG: http://www.germane-software.com/~ser/Security/ser_public.gpg

In This Thread

Prev Next