Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check if static_file_r_path is set #102

Merged
merged 4 commits into from Dec 3, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -34,12 +34,16 @@ module Jekyll
static_files.delete_if do |static_file|

# Remove "/" from beginning of static file relative path
static_file_r_path = static_file.instance_variable_get(:@relative_path).dup
static_file_r_path[0] = ''

exclude_paths.any? do |exclude_path|
Pathname.new(static_file_r_path).descend do |static_file_path|
break(true) if (Pathname.new(exclude_path) <=> static_file_path) == 0
if static_file.instance_variable_get(:@relative_path) != nil
static_file_r_path = static_file.instance_variable_get(:@relative_path).dup
if static_file_r_path
static_file_r_path[0] = ''

exclude_paths.any? do |exclude_path|
Pathname.new(static_file_r_path).descend do |static_file_path|
break(true) if (Pathname.new(exclude_path) <=> static_file_path) == 0
end
end
end
end
end
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.