diff --git a/spec/baked_file_system_spec.cr b/spec/baked_file_system_spec.cr index 1a71138..3e8adaf 100644 --- a/spec/baked_file_system_spec.cr +++ b/spec/baked_file_system_spec.cr @@ -36,7 +36,7 @@ describe BakedFileSystem do it "get correct file attributes" do baked_file = Storage.get("images/sidekiq.png") - baked_file.size.should eq(52949) + baked_file.size.should eq(52947) baked_file.compressed_size.should be_close 47883, 40 baked_file = Storage.get("/lorem.txt") diff --git a/spec/storage/images/sidekiq.png b/spec/storage/images/sidekiq.png index adc744c..2c89846 100644 Binary files a/spec/storage/images/sidekiq.png and b/spec/storage/images/sidekiq.png differ diff --git a/src/loader/loader.cr b/src/loader/loader.cr index b9a762a..3908804 100644 --- a/src/loader/loader.cr +++ b/src/loader/loader.cr @@ -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"