Rename EntryFilter#bad_symlink? to EntryFilter#symlink_outside_site_source?
This commit is contained in:
parent
f60d3a8dbc
commit
bbd2a2b7f1
|
@ -52,10 +52,10 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def symlink?(entry)
|
def symlink?(entry)
|
||||||
site.safe && File.symlink?(entry) && bad_symlink?(entry)
|
site.safe && File.symlink?(entry) && symlink_outside_site_source?(entry)
|
||||||
end
|
end
|
||||||
|
|
||||||
def bad_symlink?(entry)
|
def symlink_outside_site_source?(entry)
|
||||||
! File.realpath(entry).start_with?(File.realpath(@site.source))
|
! File.realpath(entry).start_with?(File.realpath(@site.source))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue