Skip to content

Commit

Permalink
Don't reject paths with 'hidden' components
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Aug 25, 2024
1 parent ea0b659 commit f65f62c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified spec/storage/images/sidekiq.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/loader/loader.cr
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ module BakedFileSystem
result = [] of String

files = Dir.glob(Path[root_path].to_posix.join("**", "*"))
# Reject hidden entities and directories
.reject { |path| File.directory?(path) || !(path =~ /(\/\..+)/).nil? }
# Reject directories
.reject { |path| File.directory?(path) }

files.each do |path|
io << "bake_file BakedFileSystem::BakedFile.new(\n"
Expand Down

0 comments on commit f65f62c

Please sign in to comment.