Skip to content

Commit 52870c0

Browse files
committed
Fix endless recursion and make sure we stay in site.dest
On Windows parent_dir can be 'd:/' causing an endless recursion. Signed-off-by: Sven Strickroth <[email protected]>
1 parent c2b187c commit 52870c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/jekyll-multisite.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def sanitized_path(base_directory, questionable_path)
4646
class Cleaner
4747
def parent_dirs(file)
4848
parent_dir = File.dirname(file)
49-
if parent_dir == '/'
49+
if parent_dir == '/' or File.dirname(parent_dir) == parent_dir or !parent_dir.start_with?(site.dest)
5050
[]
5151
elsif parent_dir == site.dest
5252
[]

0 commit comments

Comments
 (0)