Browse files

Fix sanitizing of basepath on globbed extra files

  • Loading branch information...
1 parent 9eb3851 commit d6411005ca08731030b8ed2e2c995d962cc4e5a0 @lsegal lsegal committed Mar 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/source_cleaner.rb
View
2 lib/source_cleaner.rb
@@ -17,7 +17,7 @@ def basepath; @basepath end
def add_extra_files(*files)
files.map! {|f| f.include?("*") ? Dir.glob(File.join(basepath, f)) : f }.flatten!
files.each do |f|
- filename = f.sub(/^#{File.realpath(basepath)}\/*/, '')
+ filename = f.sub(/^(#{File.realpath(basepath)}|#{basepath})\//, '')
options[:files] << YARD::CodeObjects::ExtraFileObject.new(filename, '')
end
end

0 comments on commit d641100

Please sign in to comment.