Author: midon
Date: Sat Apr 18 01:48:50 2009
New Revision: 766201
URL: http://svn.apache.org/viewvc?rev=766201&view=rev
Log:
make sure the matching file is not a directory
Modified:
ode/branches/APACHE_ODE_1.X/tasks/headers.rake
Modified: ode/branches/APACHE_ODE_1.X/tasks/headers.rake
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/tasks/headers.rake?rev=766201&r1=766200&r2=766201&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/tasks/headers.rake (original)
+++ ode/branches/APACHE_ODE_1.X/tasks/headers.rake Sat Apr 18 01:48:50 2009
@@ -85,7 +85,7 @@
# This also tells us which files to look at.
extensions = licenses.keys.join(",")
count = FileList["**/*{#{extensions}}"].inject(0) do |count, filename|
- if File.readlines(filename)[0..3].join !~ /Licensed to the Apache
Software Foundation/
+ if File.file?(filename) and File.readlines(filename)[0..3].join !~
/Licensed to the Apache Software Foundation/
when_writing "Missing header in #{filename}" do
# Figure the license from the file, inject it into the file and
rewrite it.
license = licenses[filename.pathmap("%x")]