Commit the paths one by one to Jekyll.sanitized_path with the proper initial base.
Prevents errors like these: [39/78] TestPost#test_: A Post processing posts should not be writable outside of destination. /Users/parker/jekyll/jekyll/test/dest /Users/parker/jekyll/jekyll/test/dest/Users/parker/jekyll/baddie.html = 0.01 s 1) Failure: TestPost#test_: A Post processing posts should not be writable outside of destination. [/Users/parker/jekyll/jekyll/test/test_post.rb:152]: Failed assertion, no message given.
This commit is contained in:
parent
2ee8d690c4
commit
90cddade53
|
@ -100,7 +100,9 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns a path which is prefixed with the source directory.
|
# Returns a path which is prefixed with the source directory.
|
||||||
def in_source_dir(*paths)
|
def in_source_dir(*paths)
|
||||||
Jekyll.sanitized_path(source, File.join(*paths.flatten))
|
paths.reduce(source) do |base, path|
|
||||||
|
Jekyll.sanitized_path(base, path)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Public: Prefix a given path with the destination directory.
|
# Public: Prefix a given path with the destination directory.
|
||||||
|
@ -110,7 +112,9 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns a path which is prefixed with the destination directory.
|
# Returns a path which is prefixed with the destination directory.
|
||||||
def in_dest_dir(*paths)
|
def in_dest_dir(*paths)
|
||||||
Jekyll.sanitized_path(dest, File.join(*paths.flatten))
|
paths.reduce(dest) do |base, path|
|
||||||
|
Jekyll.sanitized_path(base, path)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# The list of collections and their corresponding Jekyll::Collection instances.
|
# The list of collections and their corresponding Jekyll::Collection instances.
|
||||||
|
|
Loading…
Reference in New Issue