Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jekyll-multisite.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ Gem::Specification.new do |s|
s.license = 'GPL-3.0'
s.files = ['lib/jekyll-multisite.rb']
s.add_runtime_dependency 'jekyll', '~> 3.0', '>= 3.0.1'
s.add_runtime_dependency 'jekyll-paginate', '~> 1.1.0'
end
6 changes: 4 additions & 2 deletions lib/jekyll-multisite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def sanitized_path(base_directory, questionable_path)
base_directory
elsif questionable_path.start_with?(base_directory)
questionable_path
elsif File.exists?(questionable_path) and questionable_path != '/'
elsif File.exists?(questionable_path) and !questionable_path.start_with?('/') and (ENV['OS'] == 'Windows_NT')
File.expand_path(questionable_path)
elsif File.exists?(questionable_path) and questionable_path != '/' and !(ENV['OS'] == 'Windows_NT')
File.expand_path(questionable_path)
else
File.join(base_directory, questionable_path)
Expand All @@ -46,7 +48,7 @@ def sanitized_path(base_directory, questionable_path)
class Cleaner
def parent_dirs(file)
parent_dir = File.dirname(file)
if parent_dir == '/'
if parent_dir == '/' or File.dirname(parent_dir) == parent_dir or !parent_dir.start_with?(site.dest)
[]
elsif parent_dir == site.dest
[]
Expand Down