From 0af4e21018800ef5fedff755f17495bcbb2ec56c Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 2 Feb 2013 19:52:31 +0100 Subject: [PATCH] Ignore README* in link(). --- app/models/package.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/models/package.rb b/app/models/package.rb index 837be4fad..d6819c80c 100644 --- a/app/models/package.rb +++ b/app/models/package.rb @@ -121,6 +121,15 @@ class Package < ApplicationModel entry = entry.sub( '//', '/' ) file = entry file = file.sub( /#{package_base_dir.to_s}/, '' ) + file = file.sub( /^\//, '' ) + + # ignore files + if file =~ /^README/ + puts "NOTICE: Ignore #{file}" + next + end + + # get new file destination dest = @@root + '/' + file if File.directory?( entry.to_s )