Skip to content

Commit a8a04c2

Browse files
authored
Fix erroneous cosmetic changes in Pebble importer (#546)
Merge pull request 546
1 parent e6f7f12 commit a8a04c2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/jekyll-import/importers/pebble.rb

+3-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def self.specify_options(c)
1515
end
1616

1717
def self.process(opts)
18-
options = { directory => opts.fetch("directory", "") }
18+
options = { :directory => opts.fetch("directory", "") }
1919

2020
FileUtils.mkdir_p("_posts")
2121
FileUtils.mkdir_p("_drafts")
@@ -28,11 +28,9 @@ def self.process(opts)
2828
end
2929

3030
def self.traverse_posts_within(directory, &block)
31-
Dir.foreach(directory) do |fd|
31+
Dir.each_child(directory) do |fd|
3232
path = File.join(directory, fd)
33-
if fd.include?(".") || fd.include?("..")
34-
next
35-
elsif File.directory?(path)
33+
if File.directory?(path)
3634
traverse_posts_within(path, &block)
3735
elsif path.end_with?("xml")
3836
yield(path) if block_given?

0 commit comments

Comments
 (0)