parent
9061f0b1f3
commit
596f5d1af3
|
@ -160,11 +160,11 @@ module Jekyll
|
||||||
|
|
||||||
questionable_path.insert(0, "/") if questionable_path.start_with?("~")
|
questionable_path.insert(0, "/") if questionable_path.start_with?("~")
|
||||||
clean_path = File.expand_path(questionable_path, "/")
|
clean_path = File.expand_path(questionable_path, "/")
|
||||||
clean_path.sub!(%r!\A\w:/!, "/")
|
|
||||||
|
|
||||||
if clean_path.start_with?(base_directory.sub(%r!\A\w:/!, "/"))
|
if clean_path.start_with?(base_directory)
|
||||||
clean_path
|
clean_path
|
||||||
else
|
else
|
||||||
|
clean_path.sub!(%r!\A\w:/!, "/")
|
||||||
File.join(base_directory, clean_path)
|
File.join(base_directory, clean_path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue