mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-31 17:58:29 -05:00
Fix bug where Command.globs didn't delete the destination directory.
There was often a mix between absolute and relative paths and in the previous version, the destination argument was usually an absolute path where the glob array (from Dir['*']) was a relative path.
This commit is contained in:
@@ -3,7 +3,7 @@ module Jekyll
|
||||
def self.globs(source, destination)
|
||||
Dir.chdir(source) do
|
||||
dirs = Dir['*'].select { |x| File.directory?(x) }
|
||||
dirs -= [destination]
|
||||
dirs -= [destination, File.realpath(destination), File.basename(destination)]
|
||||
dirs = dirs.map { |x| "#{x}/**/*" }
|
||||
dirs += ['*']
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user