Fix issue #5276, where path strips root destination dir if filename matches
This commit is contained in:
parent
596f5d1af3
commit
7892c5e1f3
|
@ -161,7 +161,9 @@ module Jekyll
|
|||
questionable_path.insert(0, "/") if questionable_path.start_with?("~")
|
||||
clean_path = File.expand_path(questionable_path, "/")
|
||||
|
||||
if clean_path.start_with?(base_directory)
|
||||
return clean_path if clean_path.eql?(base_directory)
|
||||
|
||||
if clean_path.start_with?(base_directory.sub(%r!\z!, "/"))
|
||||
clean_path
|
||||
else
|
||||
clean_path.sub!(%r!\A\w:/!, "/")
|
||||
|
|
Loading…
Reference in New Issue