Bug #2580: rake clean removes core directory
http://redmine.ruby-lang.org/issues/show/2580

Author: John Downey
Status: Open, Priority: Normal
Category: lib
ruby -v: ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]

I saw this mailing list post http://rubyforge.org/pipermail/rake-devel/2007-January/000274.html from a while back that had the same problem I did. It looks like to fix it there is now a check in lib/rake/clean.rb to prevent folders name core from being removed.

In my case I am using rake on Windows and the folder is name Core. Running a rake clean removes this folder presumably because it doesn't match the string comparison.

To fix this issue temporarily I changed line 20 in lib/rake/clean.rb from:

fn.pathmap("%f") == 'core' && File.directory?(fn)

to:

fn.pathmap("%f").downcase == 'core' && File.directory?(fn)

and it no longer deletes the folder I have named Core.


----------------------------------------
http://redmine.ruby-lang.org