lib/stasis.rb in stasis-0.1.16 vs lib/stasis.rb in stasis-0.1.17
- old
+ new
@@ -78,10 +78,10 @@
@root = File.expand_path(root)
@destination = args[0] || @root + '/public'
@destination = File.expand_path(@destination, @root)
# Create an `Array` of paths that Stasis will act upon.
- @paths = Dir["#{@root}/**/*"]
+ @paths = Dir.glob("#{@root}/**/*", File::FNM_DOTMATCH)
# Reject paths that are directories or within the destination directory.
@paths.reject! do |path|
!File.file?(path) || path[0..@destination.length-1] == @destination
end